[projects/git-slug: 165/170] adc: Prevent copy command from copying auto tags and Ra branches

glen glen at pld-linux.org
Mon Sep 21 21:52:40 CEST 2015


commit a275748707704cf57443aa727bb0aaa4b88e4228
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Fri Feb 22 17:20:11 2013 +0000

    adc: Prevent copy command from copying auto tags and Ra branches

 adc/move | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/adc/move b/adc/move
index f2dc75a..c1a0bbe 100755
--- a/adc/move
+++ b/adc/move
@@ -33,6 +33,12 @@ case $PROG in
         die 'Error: $PROG called with name different from copy or move'
 esac
 $cmd "$move_from_full/description" "$move_to_full"
+if [ "$cmd" = 'cp' ]; then
+    git --git-dir="$move_to_full" for-each-ref --format='%(refname)'  refs/tags/auto/ 'refs/heads/R[aA]-branch' | \
+        while read ref; do
+            git --git-dir="$move_to_full" update-ref -d "$ref"
+        done
+fi
 
 ( echo $GL_USER
   echo "$move_to"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list