From: Junio C Hamano Date: Thu, 27 Aug 2009 23:59:25 +0000 (-0700) Subject: Merge branch 'jh/submodule-foreach' X-Git-Tag: v1.6.5-rc0~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=adc542353199bdc0b9b1ed5d03cf881b7efaff6e;p=git.git Merge branch 'jh/submodule-foreach' * jh/submodule-foreach: git clone: Add --recursive to automatically checkout (nested) submodules t7407: Use 'rev-parse --short' rather than bash's substring expansion notation git submodule status: Add --recursive to recurse into nested submodules git submodule update: Introduce --recursive to update nested submodules git submodule foreach: Add --recursive to recurse into nested submodules git submodule foreach: test access to submodule name as '$name' Add selftest for 'git submodule foreach' git submodule: Cleanup usage string and add option parsing to cmd_foreach() git submodule foreach: Provide access to submodule name, as '$name' Conflicts: Documentation/git-submodule.txt git-submodule.sh --- adc542353199bdc0b9b1ed5d03cf881b7efaff6e diff --cc Documentation/git-submodule.txt index bb7d15917,b81c830c2..5ccdd18c8 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@@ -11,12 -11,12 +11,12 @@@ SYNOPSI [verse] 'git submodule' [--quiet] add [-b branch] [--reference ] [--] - 'git submodule' [--quiet] status [--cached] [--] [...] + 'git submodule' [--quiet] status [--cached] [--recursive] [--] [...] 'git submodule' [--quiet] init [--] [...] 'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase] - [--reference ] [--merge] [--] [...] + [--reference ] [--merge] [--recursive] [--] [...] -'git submodule' [--quiet] summary [--cached] [--summary-limit ] [commit] [--] [...] +'git submodule' [--quiet] summary [--cached|--files] [--summary-limit ] [commit] [--] [...] - 'git submodule' [--quiet] foreach + 'git submodule' [--quiet] foreach [--recursive] 'git submodule' [--quiet] sync [--] [...] diff --cc git-submodule.sh index 9bdd6ea3d,446bbc0a1..bfbd36b6f --- a/git-submodule.sh +++ b/git-submodule.sh @@@ -4,9 -4,14 +4,14 @@@ # # Copyright (c) 2007 Lars Hjemli - USAGE="[--quiet] [--cached|--files] \ - [add [-b branch] ]|[status|init|update [-i|--init] [-N|--no-fetch] [--rebase|--merge]|summary [-n|--summary-limit ] []] \ - [--] [...]|[foreach ]|[sync [--] [...]]" + dashless=$(basename "$0" | sed -e 's/-/ /') + USAGE="[--quiet] add [-b branch] [--reference ] [--] + or: $dashless [--quiet] status [--cached] [--recursive] [--] [...] + or: $dashless [--quiet] init [--] [...] + or: $dashless [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--reference ] [--merge] [--recursive] [--] [...] - or: $dashless [--quiet] summary [--cached] [--summary-limit ] [commit] [--] [...] ++ or: $dashless [--quiet] summary [--cached|--files] [--summary-limit ] [commit] [--] [...] + or: $dashless [--quiet] foreach [--recursive] + or: $dashless [--quiet] sync [--] [...]" OPTIONS_SPEC= . git-sh-setup . git-parse-remote @@@ -16,9 -21,9 +21,10 @@@ command branch= reference= cached= +files= nofetch= update= + prefix= # Resolve relative url by appending to parent's url resolve_relative_url ()