parse-remote: do not barf on a remote shorthand without any refs to fetch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
e1b161161d
commit
ae9c6ffe30
@ -81,7 +81,14 @@ get_remote_default_refs_for_push () {
|
|||||||
# is to help prevent randomly "globbed" ref from being chosen as
|
# is to help prevent randomly "globbed" ref from being chosen as
|
||||||
# a merge candidate
|
# a merge candidate
|
||||||
expand_refs_wildcard () {
|
expand_refs_wildcard () {
|
||||||
|
remote="$1"
|
||||||
|
shift
|
||||||
first_one=yes
|
first_one=yes
|
||||||
|
if test "$#" = 0
|
||||||
|
then
|
||||||
|
echo empty
|
||||||
|
echo >&2 "Nothing specified for fetching with remote.$remote.fetch"
|
||||||
|
fi
|
||||||
for ref
|
for ref
|
||||||
do
|
do
|
||||||
lref=${ref#'+'}
|
lref=${ref#'+'}
|
||||||
@ -132,7 +139,7 @@ canon_refs_list_for_fetch () {
|
|||||||
if test "$1" = "-d"
|
if test "$1" = "-d"
|
||||||
then
|
then
|
||||||
shift ; remote="$1" ; shift
|
shift ; remote="$1" ; shift
|
||||||
set $(expand_refs_wildcard "$@")
|
set $(expand_refs_wildcard "$remote" "$@")
|
||||||
is_explicit="$1"
|
is_explicit="$1"
|
||||||
shift
|
shift
|
||||||
if test "$remote" = "$(get_default_remote)"
|
if test "$remote" = "$(get_default_remote)"
|
||||||
|
Loading…
Reference in New Issue
Block a user