git-migration: cvs2git_fixes.sh - change unlabeled branches to tags

draenog draenog at pld-linux.org
Mon Feb 14 14:32:34 CET 2011


Author: draenog                      Date: Mon Feb 14 13:32:34 2011 GMT
Module: git-migration                 Tag: HEAD
---- Log message:
- change unlabeled branches to tags

---- Files affected:
git-migration:
   cvs2git_fixes.sh (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: git-migration/cvs2git_fixes.sh
diff -u git-migration/cvs2git_fixes.sh:1.8 git-migration/cvs2git_fixes.sh:1.9
--- git-migration/cvs2git_fixes.sh:1.8	Fri Feb 11 21:55:53 2011
+++ git-migration/cvs2git_fixes.sh	Mon Feb 14 14:32:29 2011
@@ -22,10 +22,8 @@
         if [ -z "$name" ]; then
                 git update-ref -d "$branchname" $rev
         else
-                new_branchname=`echo $branchname | sed -e "s/unlabeled-\([0-9.]\+\)$/${name}-\1/"`
-                if [ "$branchname" != "$new_branchname" ]; then
-                        git update-ref "$new_branchname" $rev "" && git update-ref -d "$branchname" $rev
-                fi
+                new_branchname=`echo $branchname | sed -e "s/refs\/heads\/unlabeled-\([0-9.]\+\)$/${name}-\1/"`
+                git update-ref "refs/tags/$new_branchname" $rev "" && git update-ref -d "$branchname" $rev
         fi
 done
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/git-migration/cvs2git_fixes.sh?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list