Revert "git-push: avoid falling back on pushing "matching" refs."
This reverts 9e9b26751a
commit partially.
When no refspec is specified on the command line and there is no
default refspec to push specified in remotes/ file, just let
send-pack to do its default "matching refs" updates.
Thanks to Greg KH for complaining.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
e72c9f5c54
commit
8e76c79f4a
11
git-push.sh
11
git-push.sh
@ -57,14 +57,9 @@ esac
|
|||||||
|
|
||||||
shift ;# away the initial 'x'
|
shift ;# away the initial 'x'
|
||||||
|
|
||||||
# Now we have explicit refs from the command line or from remotes/
|
# $# is now 0 if there was no explicit refspec on the command line
|
||||||
# shorthand, or --tags. Falling back on the current branch if we still
|
# and there was no defalt refspec to push from remotes/ file.
|
||||||
# do not have any may be an alternative, but prevent mistakes for now.
|
# we will let git-send-pack to do its "matching refs" thing.
|
||||||
|
|
||||||
case "$#,$has_all" in
|
|
||||||
0,)
|
|
||||||
die "No refs given to be pushed." ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$remote" in
|
case "$remote" in
|
||||||
git://*)
|
git://*)
|
||||||
|
Loading…
Reference in New Issue
Block a user