threads / patch / 18688

patchgit submodule: fix add usage line

Subject: [PATCH] git submodule: fix add usage line

## tl;dr

One message between Apr 2, 2009 and Apr 2, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Julien Danjou· Apr 2, 2009, 08:47 UTC · lore

Actually, cmd_add() parse options first and stop as soon as an unknown word is encoutered. So we need to put the option like -b at the beginning, or the option parsing loop will be escaped before we got the change to have our -b option parsed.

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 git-submodule.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-submodule.sh +1 −1
diff --git a/git-submodule.sh b/git-submodule.sh
index 0a27232..7c2e060 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -5,7 +5,7 @@
 # Copyright (c) 2007 Lars Hjemli
 
 USAGE="[--quiet] [--cached] \
-[add <repo> [-b branch] <path>]|[status|init|update [-i|--init] [-N|--no-fetch]|summary [-n|--summary-limit <n>] [<commit>]] \
+[add [-b branch] <repo> <path>]|[status|init|update [-i|--init] [-N|--no-fetch]|summary [-n|--summary-limit <n>] [<commit>]] \
 [--] [<path>...]|[foreach <command>]|[sync [--] [<path>...]]"
 OPTIONS_SPEC=
 . git-sh-setup
-- 
1.6.2.1

← back to recent threads