]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-reset.sh
refs.c: make sure leading directories exist before writing a ref.
[git.git] / git-reset.sh
index f9995cadf563a7b3b2c1dcdeea3bf862feac2e4b..72ef303aedc69a1d9cdd946a91059638cb2e550a 100755 (executable)
@@ -1,5 +1,9 @@
 #!/bin/sh
-. git-sh-setup || die "Not a git archive"
+. git-sh-setup
+
+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