[Xfce4-commits] <xfce-git-hooks:master> don't allow tag modifications

Brian J. Tarricone brian at tarricone.org
Wed Aug 12 21:28:01 CEST 2009


Updating branch refs/heads/master
         to 06e0fcc27a3134c8b9777a53fec6e509001485e8 (commit)
       from 6ccaa34c182199efcb816f55e8a5ba2c200ff2ab (commit)

commit 06e0fcc27a3134c8b9777a53fec6e509001485e8
Author: Brian J. Tarricone <brian at tarricone.org>
Date:   Mon Aug 10 03:15:33 2009 -0700

    don't allow tag modifications

 hooks/update-01-block-commits-to-tags |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/hooks/update-01-block-commits-to-tags b/hooks/update-01-block-commits-to-tags
index 1a24852..612f104 100755
--- a/hooks/update-01-block-commits-to-tags
+++ b/hooks/update-01-block-commits-to-tags
@@ -1 +1,19 @@
 #!/bin/sh
+
+refname=$1
+oldrev=$2
+newrev=$3
+
+[ "$newrev" ] || exit 1
+
+case $refname in
+  refs/tags/*)
+    if git rev-parse --verify -q "$refname"; then
+      echo "Modifying existing tags is not allowed" >&2
+      exit 1
+    fi
+  *)
+    ;;
+esac
+
+exit 0



More information about the Xfce4-commits mailing list