Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
parse-remote: do not barf on a remote shorthand without any refs to f…
Browse files Browse the repository at this point in the history
…etch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Jan 26, 2007
1 parent e1b1611 commit ae9c6ff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion git-parse-remote.sh
Expand Up @@ -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#'+'}
Expand Down Expand Up @@ -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)"
Expand Down

0 comments on commit ae9c6ff

Please sign in to comment.