diff options
author | Junio C Hamano <junkio@cox.net> | 2007-01-25 21:50:49 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-25 22:03:16 -0800 |
commit | ae9c6ffe3039fc4d0a89eb253800b3ca58830bb2 (patch) | |
tree | 18c396ccc6f38f415963aeb3f1407057b65e2af9 /git-parse-remote.sh | |
parent | e1b161161d253a9e7e4cf21cd2ab5b82a4b85273 (diff) | |
download | git-ae9c6ffe3039fc4d0a89eb253800b3ca58830bb2.tar.gz |
parse-remote: do not barf on a remote shorthand without any refs to fetch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-parse-remote.sh')
-rwxr-xr-x | git-parse-remote.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 1122c8389d..7e87f2e06e 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -81,7 +81,14 @@ get_remote_default_refs_for_push () { # is to help prevent randomly "globbed" ref from being chosen as # a merge candidate expand_refs_wildcard () { + remote="$1" + shift first_one=yes + if test "$#" = 0 + then + echo empty + echo >&2 "Nothing specified for fetching with remote.$remote.fetch" + fi for ref do lref=${ref#'+'} @@ -132,7 +139,7 @@ canon_refs_list_for_fetch () { if test "$1" = "-d" then shift ; remote="$1" ; shift - set $(expand_refs_wildcard "$@") + set $(expand_refs_wildcard "$remote" "$@") is_explicit="$1" shift if test "$remote" = "$(get_default_remote)" |