summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e7f2aa)
raw | patch | inline | side by side (parent: 1e7f2aa)
author | Johan Herland <johan@herland.net> | |
Wed, 19 Aug 2009 01:45:19 +0000 (03:45 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Aug 2009 05:50:30 +0000 (22:50 -0700) |
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh | patch | blob | history |
diff --git a/git-submodule.sh b/git-submodule.sh
index d8ecdb91fe1f30f96c3aba1b5b8c36a965d8d89b..f48f682ab6d54f8c1f016acaea8d80a9ef33a6c4 100755 (executable)
--- a/git-submodule.sh
+++ b/git-submodule.sh
#
# Copyright (c) 2007 Lars Hjemli
-USAGE="[--quiet] [--cached] \
-[add [-b branch] <repo> <path>]|[status|init|update [-i|--init] [-N|--no-fetch] [--rebase|--merge]|summary [-n|--summary-limit <n>] [<commit>]] \
-[--] [<path>...]|[foreach <command>]|[sync [--] [<path>...]]"
+dashless=$(basename "$0" | sed -e 's/-/ /')
+USAGE="[--quiet] add [-b branch] [--reference <repository>] [--] <repository> <path>
+ or: $dashless [--quiet] status [--cached] [--] [<path>...]
+ or: $dashless [--quiet] init [--] [<path>...]
+ or: $dashless [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--reference <repository>] [--merge] [--] [<path>...]
+ or: $dashless [--quiet] summary [--cached] [--summary-limit <n>] [commit] [--] [<path>...]
+ or: $dashless [--quiet] foreach <command>
+ or: $dashless [--quiet] sync [--] [<path>...]"
OPTIONS_SPEC=
. git-sh-setup
. git-parse-remote
#
cmd_foreach()
{
+ # parse $args after "submodule ... foreach".
+ while test $# -ne 0
+ do
+ case "$1" in
+ -q|--quiet)
+ GIT_QUIET=1
+ ;;
+ -*)
+ usage
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+ done
+
module_list |
while read mode sha1 stage path
do