]> gitweb.fluxo.info Git - utils-git.git/commitdiff
Adds git-checkout-tag
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 20 Jun 2015 01:13:23 +0000 (22:13 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 20 Jun 2015 01:13:23 +0000 (22:13 -0300)
git-check-tag

index 99d67dae33d19d530111f1ae392d0a4f6c38c08d..ca9fc6b50fcfb7b0d1a7b08e7394f9c2359d966b 100755 (executable)
@@ -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