git-migration: cvs2git_fixes.sh - branch --contains is expensive so call on...
draenog
draenog at pld-linux.org
Fri Feb 11 21:32:43 CET 2011
Author: draenog Date: Fri Feb 11 20:32:43 2011 GMT
Module: git-migration Tag: HEAD
---- Log message:
- branch --contains is expensive so call only when necessary
---- Files affected:
git-migration:
cvs2git_fixes.sh (1.6 -> 1.7)
---- Diffs:
================================================================
Index: git-migration/cvs2git_fixes.sh
diff -u git-migration/cvs2git_fixes.sh:1.6 git-migration/cvs2git_fixes.sh:1.7
--- git-migration/cvs2git_fixes.sh:1.6 Wed Feb 9 10:45:23 2011
+++ git-migration/cvs2git_fixes.sh Fri Feb 11 21:32:38 2011
@@ -19,9 +19,9 @@
git show-ref --tags | \
while read rev tagname; do
- if [ "`git show --format="%an" --quiet $rev`" = "cvs2svn" -a \
- -z "`git branch --contains $rev`" ]; then
+ if [ "`git show --format="%an" --quiet $rev`" = "cvs2svn" ]; then
git diff-tree --diff-filter=ACMRTUXB --quiet $rev~ $rev && \
+ [ -z "`git branch --contains $rev`" ] && \
git update-ref "$tagname" $rev~
fi
done
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/git-migration/cvs2git_fixes.sh?r1=1.6&r2=1.7&f=u
More information about the pld-cvs-commit
mailing list