summaryrefslogtreecommitdiff
path: root/git-push.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-21 20:36:12 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-21 20:36:12 (GMT)
commit8e76c79f4a1e66ed8e371d1232e879f45141dce1 (patch)
tree31ba4fad3697dc2a6dbd60a7b249d3b72ea15cb2 /git-push.sh
parente72c9f5c5482b8b83dc57ed369b0fce4f823a1f2 (diff)
downloadgit-8e76c79f4a1e66ed8e371d1232e879f45141dce1.zip
git-8e76c79f4a1e66ed8e371d1232e879f45141dce1.tar.gz
git-8e76c79f4a1e66ed8e371d1232e879f45141dce1.tar.bz2
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>
Diffstat (limited to 'git-push.sh')
-rwxr-xr-xgit-push.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/git-push.sh b/git-push.sh
index ce2ad71..706db99 100755
--- a/git-push.sh
+++ b/git-push.sh
@@ -57,14 +57,9 @@ esac
shift ;# away the initial 'x'
-# Now we have explicit refs from the command line or from remotes/
-# shorthand, or --tags. Falling back on the current branch if we still
-# do not have any may be an alternative, but prevent mistakes for now.
-
-case "$#,$has_all" in
-0,)
- die "No refs given to be pushed." ;;
-esac
+# $# is now 0 if there was no explicit refspec on the command line
+# and there was no defalt refspec to push from remotes/ file.
+# we will let git-send-pack to do its "matching refs" thing.
case "$remote" in
git://*)