Skip to contentSkip to conversation

Add usage statement for git-reset.sh

PATCH New [email protected] 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add usage statement for git-reset.sh

Signed-off-by Chris Shoemaker <c.shoemaker at cox.net>

---

 git-reset.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

6bce396534f26c05d43bfb42d057465c4e564030

git-reset.sh +6 -0
@@ -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