[Bps-public-commit] BPS git mailer tools branch, master, updated. 0db40a378f49800642ababa47b0d51ca7fcbffa3

jesse jesse at bestpractical.com
Sun Apr 12 16:56:24 EDT 2009


The branch, master has been updated
       via  0db40a378f49800642ababa47b0d51ca7fcbffa3 (commit)
      from  3f6e7c3cd35dd981ed50703f8bea47ccac66588a (commit)

Summary of changes:
 svn-to-git |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 0db40a378f49800642ababa47b0d51ca7fcbffa3
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sun Apr 12 16:56:05 2009 -0400

    improve remote ref rewriting per nothingmuch

diff --git a/svn-to-git b/svn-to-git
index ca57d23..99c9a77 100644
--- a/svn-to-git
+++ b/svn-to-git
@@ -13,11 +13,19 @@ echo "Migrating svn repo $REPO to git repo  $GIT_REPO"
 
 svn ls svn://svn.bestpractical.com/${REPO}/trunk 2>/dev/null && OPTS="--stdlayout"
 
+if [ "x$OPTS" = "x" ] ; then
+    echo "Doing the cheap and easy ref removal"
+    CLEANUP_CMD="for ref in \$( git for-each-ref 'refs/remotes/*' --format='%(refname)' ); do git update-ref -d "\$ref"; done"
+else
+    CLEANUP_CMD="git svn-abandon-fix-refs"
+fi
+
+
+
 git svn clone $OPTS --prefix svn/ --authors-file=/Users/jesse/git/bps/git-mailer.git/authors.txt \
     svn://svn.bestpractical.com/${REPO} /tmp/svn-${REPO} && \
 cd /tmp/svn-${REPO} && \
-git svn-abandon-fix-refs && \
-touch .git/info/grafts && \
+sh -c "$CLEANUP_CMD" && \
 git svn-abandon-cleanup  && \
 ssh fsck.com "cd /git/${GIT_REPO}.git; git config receive.denyNonFastforwards false" && \
 git push --mirror git+ssh://diesel.bestpractical.com/git/${GIT_REPO}.git &&

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list