summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b0c717)
raw | patch | inline | side by side (parent: 1b0c717)
author | Yasushi SHOJI <yashi@atmark-techno.com> | |
Thu, 30 Mar 2006 17:00:43 +0000 (17:00 +0000) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 30 Mar 2006 23:31:03 +0000 (15:31 -0800) |
git-clone currently take option '-o' to specify origin. this patch
makes git-clone to take double-dashed option '--origin' and other
abbreviations in addtion to the current single-dashed option.
[jc: with minor fixups]
Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
makes git-clone to take double-dashed option '--origin' and other
abbreviations in addtion to the current single-dashed option.
[jc: with minor fixups]
Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clone.sh | patch | blob | history |
diff --git a/git-clone.sh b/git-clone.sh
index 6887321972aab5825734dd81560f9c8cdd010660..0e8a57d2b499dd4f444ba8d93fb271ec88c222c7 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
unset CDPATH
usage() {
- echo >&2 "Usage: $0 [--use-separate-remote] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [-o <name>] [-n] <repo> [<dir>]"
+ echo >&2 "Usage: $0 [--use-separate-remote] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [-n] <repo> [<dir>]"
exit 1
}
*,-q|*,--quiet) quiet=-q ;;
*,--use-separate-remote)
use_separate_remote=t ;;
- 1,-o) usage;;
1,--reference) usage ;;
*,--reference)
shift; reference="$1" ;;
*,--reference=*)
reference=`expr "$1" : '--reference=\(.*\)'` ;;
- *,-o)
+ *,-o|*,--or|*,--ori|*,--orig|*,--origi|*,--origin)
case "$2" in
+ '')
+ usage ;;
*/*)
echo >&2 "'$2' is not suitable for an origin name"
exit 1
exit 1
}
test -z "$origin_override" || {
- echo >&2 "Do not give more than one -o options."
+ echo >&2 "Do not give more than one --origin options."
exit 1
}
origin_override=yes
then
if test yes = "$origin_override"
then
- echo >&2 '--bare and -o $origin options are incompatible.'
+ echo >&2 '--bare and --origin $origin options are incompatible.'
exit 1
fi
if test t = "$use_separate_remote"