summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfreku045@student.liu.se <freku045@student.liu.se>2005-12-13 22:30:31 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-14 10:53:43 (GMT)
commit349701210dcfb87ed155258cd77644035a69f613 (patch)
tree826618ecc90437dea9d4671b3a8b555a8c81c2d1
parent806f36d4d7caf75b6d3e098cb0353d85d3477c7d (diff)
downloadgit-349701210dcfb87ed155258cd77644035a69f613.zip
git-349701210dcfb87ed155258cd77644035a69f613.tar.gz
git-349701210dcfb87ed155258cd77644035a69f613.tar.bz2
git-verify-tag: Usage string clean-up, emit usage string at incorrect invocation
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-verify-tag.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/git-verify-tag.sh b/git-verify-tag.sh
index 1f44da5..726b1e7 100755
--- a/git-verify-tag.sh
+++ b/git-verify-tag.sh
@@ -1,11 +1,13 @@
#!/bin/sh
-GIT_DIR=`git-rev-parse --git-dir` || exit $?
+USAGE='<tag>'
+SUBDIRECTORY_OK='Yes'
+. git-sh-setup
-die () {
- echo >&2 "$*"
- exit 1
-}
+if [ "$#" != "1" ]
+then
+ usage
+fi
type="$(git-cat-file -t "$1" 2>/dev/null)" ||
die "$1: no such object."