[LLVMdev] GIT mirroring

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Mar 21 13:54:10 PDT 2011


On Mar 21, 2011, at 1:47 PM, Bob Wilson wrote:

> I've been using Jakob's commands below, but it has stopped working for me.  This happened roughly around the time when Anton added the other branches, but I'm not sure if that was the cause or not.  The symptom is that the "git svn rebase -l" command does nothing except say that the master branch is already up to date, and "git svn dcommit" complains that files are out of date.  In both cases, "git svn rebase" (without "-l") solves the problem, but without using the GIT mirror, so it's slow.
> 
> I've tried re-creating my git repos from scratch but that did not fix the problem.  Any ideas?

The trick with 'git config --add remote.origin.fetch' doesn't work anymore. I tried changing it to refer to the remote's master branch instead, but that has caused strange problems.

I now run 'git update-ref' every time I fetch from the mirror:

  git fetch -p origin
  git update-ref refs/remotes/git-svn origin/master
  git svn rebase -l

Same for committing:

  git svn dcommit
  git fetch -p origin
  git update-ref refs/remotes/git-svn origin/master
  git svn rebase -l

For the initial clone and setup:

  git clone http://llvm.org/git/llvm.git
  cd llvm
  git svn init https://llvm.org/svn/llvm-project/llvm/trunk
  git update-ref refs/remotes/git-svn origin/master
  git svn rebase -l

/jakob




More information about the llvm-dev mailing list