git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Converting to Git using svn-fe (Was: Speeding up the initial git-svn fetch)

From
Will Palmer <wmpalmer@gmail.com>
Date
Oct 20, 2010, 13:42 UTC
Message-ID
<1287582160.2673.25.camel@wpalmer.simply-domain>
In-Reply-To
<m3bp6pkrf0.fsf@localhost.localdomain>
On Wed, 2010-10-20 at 04:59 -0700, Jakub Narebski wrote:
Show 39 quoted lines
> Will Palmer <wmpalmer@gmail.com> writes:
> > On Tue, 2010-10-19 at 12:12 +0530, Ramkumar Ramachandra wrote:
> > > Stephen Bash writes:
> > ...
> > > > 
> > > > I have 32 SVN revs in my history that touch multiple Git commit
> > > > objects.  The simplest example is
> > > >   svn mv svn://svnrepo/branches/badBranchName svn://svnrepo/branches/goodBranchName
> > > > which creates a single SVN commit that touches two branches
> > > > (badBranchName will have all it's contents deleted, goodBranchName
> > > > will have an "empty commit" as described above).  The more devious
> > > > version is the SVN rev where a developer checked out / (yes, I'm not
> > > > kidding) and proceeded to modify a single file on all branches in
> > > > one commit.  In our case, that one SVN rev touches 23 git commit
> > > > objects.  And while the latter is somewhat a corner case, the former
> > > > is common and probably needs to be dealt with appropriately (it's
> > > > kind of a stupid operation in Git-land, so maybe it can just be
> > > > squashed).
> > > 
> > > Ouch! Thanks for the illustrative example- I understand now. We have
> > > to bend backwards to perform a one-to-one mapping. It's finally struck
> > > me- one-to-one mapping is nearly impossible to achieve, and I don't
> > > know if it makes sense to strive for it anymore. Looks like Jonathan
> > > got it earlier.
> > 
> > It's been a while since I was involved in this discussion, so maybe the
> > design has changed by now, but I was under the impression that there
> > would be one "one-to-one" mapping branch (which would never be checked
> > out), containing the history of /, and that the "real" git branches,
> > tags, etc, would be based on the trees originally referenced by the root
> > checkout, with git-notes (or similar) being used to track the weirdness
> > in mappings. How does the "multiple branches touched in a single commit"
> > complicate anything other than the heuristics for automatic branch
> > detection (which I assume nobody is at the stage of talking about yet).
> 
> I think there might be a problem in that in git commit is defined by
> its parents and its final state, while revision in Subversion is IIRC
> defined by change.  Isn't it?
> 

A "change" is a delta between one state and another, so each revision is dependent on those which came before it just as much as a a git commit is. An svn "revision" is a snapshot, regardless of how it is stored, ie, the "svn stores changes, git stores snapshots" is an implementation detail. It's a detail which makes a lot of things easier/faster in git than they would be in svn, but a mere detail none the less.

The difference of course is that the "name" of an svn revision stays the same even if aspects of that revision (for example, the commit message) are changed, while the "name" of a git commit is dependent on everything that makes up a commit. In git terms, changing a commit message is considered to be history rewriting, whereas in svn terms it is merely something which happens occasionally as part of regularly maintained repository.

the git Philosophy is ingrained in its object model: If you change something which led to a state, you change the state itself. I don't think there should be an attempt to work-around that philosophy when talking to external repositories. That is to say: if a commit message (or other revprop) in history changes, we want to treat it as if we were recovering from an upstream rebase. Of course, a problem in that could very well be "how would we know about it?", which is a good question, but one not directly related to [revision+directory]<->[commit] mappings, afaik ;)

Previous: Jakub NarebskiNext: Jakub Narebski
Message 36 of 52 in “Speeding up the initial git-svn fetch”
  1. Matt StumpOct 13, 2010
  2. Stephen BashOct 13, 2010
  3. Matt StumpOct 13, 2010
  4. Stephen BashOct 13, 2010
  5. Converting to Git using svn-fe (Was: Speeding up the initial git-svn fetch)Stephen Bash, Oct 14, 2010
  6. Jonathan NiederOct 14, 2010
  7. Sverre RabbelierOct 14, 2010
  8. Stephen BashOct 15, 2010
  9. Sverre RabbelierOct 15, 2010
  10. Stephen BashOct 16, 2010
  11. Sverre RabbelierOct 17, 2010
  12. David Michael BarrOct 17, 2010
  13. Ramkumar RamachandraOct 18, 2010
  14. Jonathan NiederOct 18, 2010
  15. Ramkumar RamachandraOct 18, 2010
  16. Sverre RabbelierOct 18, 2010
  17. Jonathan NiederOct 18, 2010
  18. Ramkumar RamachandraOct 18, 2010
  19. Sverre RabbelierOct 18, 2010
  20. Jonathan NiederOct 18, 2010
  21. Sverre RabbelierOct 18, 2010
  22. Jonathan NiederOct 18, 2010
  23. Sverre RabbelierOct 18, 2010
  24. Jonathan NiederOct 18, 2010
  25. Sverre RabbelierOct 18, 2010
  26. Jonathan NiederOct 18, 2010
  27. Ramkumar RamachandraOct 19, 2010
  28. Stephen BashOct 19, 2010
  29. Stephen BashOct 19, 2010
  30. Ramkumar RamachandraOct 19, 2010
  31. Stephen BashOct 19, 2010
  32. David Michael BarrOct 19, 2010
  33. Stephen BashOct 19, 2010
  34. Will PalmerOct 20, 2010
  35. Jakub NarebskiOct 20, 2010
  36. Will PalmerOct 20, 2010
  37. Jakub NarebskiOct 20, 2010
  38. mrevilgnomeOct 21, 2010
  39. Jakub NarebskiOct 21, 2010
  40. Stephen BashOct 21, 2010
  41. Will PalmerOct 21, 2010
  42. Stephen BashOct 21, 2010
  43. Jakub NarebskiOct 21, 2010
  44. Stephen BashOct 21, 2010
  45. Jakub NarebskiOct 21, 2010
  46. Stephen BashOct 21, 2010
  47. Jakub NarebskiOct 22, 2010
  48. Jakub NarebskiOct 21, 2010
  49. Jonathan NiederOct 21, 2010
  50. Ramkumar RamachandraOct 20, 2010
  51. Stephen BashOct 20, 2010
  52. Ramkumar RamachandraOct 20, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.