Add usage help for git-reset.sh

Signed-off-by: Chris Shoemaker <c.shoemaker at cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
c.shoemaker@cox.net 2005-10-29 00:16:20 -04:00 committed by Junio C Hamano
parent 59df2a11fe
commit 2f9d685c61

View File

@ -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