Code

Barf nicely when "git push" is run without parameter.
authorJunio C Hamano <junkio@cox.net>
Fri, 26 Aug 2005 17:37:17 +0000 (10:37 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 28 Aug 2005 19:14:30 +0000 (12:14 -0700)
Saying "internal error" makes it look like my fault ;-).

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-push-script

index 5fa5af2af896e3bf6854387e744b9d2643a8f510..744ee7e7dc8986767f410f99f4ff8c644654b172 100755 (executable)
@@ -26,6 +26,10 @@ do
        esac
        shift
 done
+case "$#" in
+0)
+       die "Where would you want to push today?" ;;
+esac
 
 . git-parse-remote-script
 remote=$(get_remote_url "$@")