@matheusbsbs / matheus-bagliano / commits / 8e76c79f4a
Fork 0

Revert "git-push: avoid falling back on pushing "matching" refs."

This reverts 9e9b26751a5ca7a257b3e1cfb319fe3e4efc663c 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>

Junio C Hamano committed Jan 21, 2006 at 12:36 UTC 8e76c79f4a1e66ed8e371d1232e879f45141dce1
1 file changed +3 -8
git-push.sh
+3 -8
@@ -57,14 +57,9 @@ esac
57
58 shift ;# away the initial 'x'
59
60 -# Now we have explicit refs from the command line or from remotes/
61 -# shorthand, or --tags. Falling back on the current branch if we still
62 -# do not have any may be an alternative, but prevent mistakes for now.
63 -
64 -case "$#,$has_all" in
65 -0,)
66 - die "No refs given to be pushed." ;;
67 -esac
60 +# $# is now 0 if there was no explicit refspec on the command line
61 +# and there was no defalt refspec to push from remotes/ file.
62 +# we will let git-send-pack to do its "matching refs" thing.
63
64 case "$remote" in
65 git://*)