File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed
Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change 44#
55# Copyright (c) 2007 Lars Hjemli
66
7- USAGE=" [--quiet] [--cached] \
8- [add [-b branch] <repo> <path>]|[status|init|update [-i|--init] [-N|--no-fetch] [--rebase|--merge]|summary [-n|--summary-limit <n>] [<commit>]] \
9- [--] [<path>...]|[foreach <command>]|[sync [--] [<path>...]]"
7+ dashless=$( basename " $0 " | sed -e ' s/-/ /' )
8+ USAGE=" [--quiet] add [-b branch] [--reference <repository>] [--] <repository> <path>
9+ or: $dashless [--quiet] status [--cached] [--] [<path>...]
10+ or: $dashless [--quiet] init [--] [<path>...]
11+ or: $dashless [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--reference <repository>] [--merge] [--] [<path>...]
12+ or: $dashless [--quiet] summary [--cached] [--summary-limit <n>] [commit] [--] [<path>...]
13+ or: $dashless [--quiet] foreach <command>
14+ or: $dashless [--quiet] sync [--] [<path>...]"
1015OPTIONS_SPEC=
1116. git-sh-setup
1217. git-parse-remote
@@ -237,6 +242,23 @@ cmd_add()
237242#
238243cmd_foreach ()
239244{
245+ # parse $args after "submodule ... foreach".
246+ while test $# -ne 0
247+ do
248+ case " $1 " in
249+ -q|--quiet)
250+ GIT_QUIET=1
251+ ;;
252+ -* )
253+ usage
254+ ;;
255+ * )
256+ break
257+ ;;
258+ esac
259+ shift
260+ done
261+
240262 module_list |
241263 while read mode sha1 stage path
242264 do
You can’t perform that action at this time.
0 commit comments