aboutsummaryrefslogtreecommitdiff
path: root/git-check-tag
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-06-19 22:13:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-06-19 22:13:23 -0300
commit0752179c989fc4f788e5cc725dffa3d15c4c93dd (patch)
treee9ae150f251e7845decebaa77cb2b64ab7b2ed05 /git-check-tag
parentc3f472db920eec6f2535d24db9aad7cc1ff7f93d (diff)
downloadutils-git-0752179c989fc4f788e5cc725dffa3d15c4c93dd.tar.gz
utils-git-0752179c989fc4f788e5cc725dffa3d15c4c93dd.tar.bz2
Adds git-checkout-tag
Diffstat (limited to 'git-check-tag')
-rwxr-xr-xgit-check-tag8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-check-tag b/git-check-tag
index 99d67da..ca9fc6b 100755
--- a/git-check-tag
+++ b/git-check-tag
@@ -9,5 +9,9 @@ BASENAME="`basename $0`"
# Get the latest tag
tag="`git describe --abbrev=0 --tags`"
-# Check it
-git tag -v $tag
+# Check or checkout it
+if [ "$BASENAME" == "git-check-tag" ]; then
+ git tag -v $tag
+elif [ "$BASENAME" == "git-checkout-tag" ]; then
+ git checkout $tag
+fi