Code

Add usage help for git-reset.sh
authorc.shoemaker@cox.net <c.shoemaker@cox.net>
Sat, 29 Oct 2005 04:16:20 +0000 (00:16 -0400)
committerJunio C Hamano <junkio@cox.net>
Sat, 29 Oct 2005 05:26:15 +0000 (22:26 -0700)
Signed-off-by: Chris Shoemaker <c.shoemaker at cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-reset.sh

index f9995cadf563a7b3b2c1dcdeea3bf862feac2e4b..2086d26d343c59d36df79d874d65f58d6d7d8b10 100755 (executable)
@@ -1,6 +1,10 @@
 #!/bin/sh
 . git-sh-setup || die "Not a git archive"
 
+usage () {
+       die 'Usage: git reset [--mixed | --soft | --hard]  [<commit-ish>]'
+}
+
 tmp=/var/tmp/reset.$$
 trap 'rm -f $tmp-*' 0 1 2 3 15
 
@@ -10,6 +14,8 @@ case "$1" in
        reset_type="$1"
        shift
        ;;
+-*)
+        usage ;;
 esac
 
 rev=$(git-rev-parse --verify --default HEAD "$@") || exit