Skip to content

Commit

Permalink
Add usage help for git-reset.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Shoemaker <c.shoemaker at cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
c.shoemaker@cox.net authored and Junio C Hamano committed Oct 29, 2005
1 parent 59df2a1 commit 2f9d685
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git-reset.sh
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -10,6 +14,8 @@ case "$1" in
reset_type="$1"
shift
;;
-*)
usage ;;
esac

rev=$(git-rev-parse --verify --default HEAD "$@") || exit
Expand Down

0 comments on commit 2f9d685

Please sign in to comment.