I'm trying to use the GCC git mirror, documented here.
Some time ago, I cloned the git repository:
git clone git://gcc.gnu.org/git/gcc.git
Added the git-svn stuff:
git svn init -Ttrunk --prefix=origin/ svn+ssh://gcc.gnu.org/svn/gcc
And then git svn rebase
and git svn dcommit
etc. all worked nicely.
Some months later, I've done various development work on local git branches, and I've come to commit more changes to upstream SVN:
Update from the git miror:
$ git rebase
Ensure I have the absolute latest from SVN, but it doesn't work:
$ git svn rebase -v Unable to determine upstream SVN information from working tree history
Somehow I've broken the meta data! As well as the above, I think I did git svn fetch
at some point, by mistake, but that shouldn't be harmful, should it?
So, I tried creating a fresh branch from the remote git mirror:
$ git branch svntrunk remotes/origin/trunk
$ git checkout svntrunk
$ git svn rebase
Unable to determine upstream SVN information from working tree history
A web search suggests that the branch history has somehow diverged from SVN, but I've checked git log
and every commit has a corresponding git-svn-id
, which seems to disprove that, no?
So, I tried a fresh clone from git://gcc.gnu.org/git/gcc.git, and in that repository git svn rebase
works fine. How can the two repos, in which both have had git rebase
from the same source, have different history? Presumably they can't, and the difference is in the local meta-data?
Now, I don't want to trash the repo that I've been working in (although I could), and exporting the patches to another repo to commit defeats the point of having git-svn in the first place. So, how can I repair it?