git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Will Palmer <wmpalmer@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
	Stephen Bash <bash@genarts.com>, Matt Stump <mstump@goatyak.com>,
	git@vger.kernel.org, Jonathan Nieder <jrnieder@gmail.com>,
	David Michael Barr <david.barr@cordelta.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Tomas Carnecky <tom@dbservice.com>
Subject: Re: Converting to Git using svn-fe (Was: Speeding up the initial git-svn fetch)
Date: Wed, 20 Oct 2010 14:42:40 +0100	[thread overview]
Message-ID: <1287582160.2673.25.camel@wpalmer.simply-domain> (raw)
In-Reply-To: <m3bp6pkrf0.fsf@localhost.localdomain>

On Wed, 2010-10-20 at 04:59 -0700, Jakub Narebski wrote:
> 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 ;)

  reply	other threads:[~2010-10-20 13:42 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 15:44 Speeding up the initial git-svn fetch Matt Stump
2010-10-13 16:02 ` Stephen Bash
2010-10-13 17:47   ` Matt Stump
2010-10-13 18:18     ` Stephen Bash
2010-10-14 16:22     ` Converting to Git using svn-fe (Was: Speeding up the initial git-svn fetch) Stephen Bash
2010-10-14 16:34       ` Jonathan Nieder
2010-10-14 20:07         ` Sverre Rabbelier
2010-10-15 14:50           ` Stephen Bash
2010-10-15 23:39             ` Sverre Rabbelier
2010-10-16  0:16               ` Stephen Bash
2010-10-17  2:25                 ` Sverre Rabbelier
2010-10-17  3:33                   ` David Michael Barr
2010-10-18  5:17       ` Ramkumar Ramachandra
2010-10-18  7:31         ` Jonathan Nieder
2010-10-18 16:38           ` Ramkumar Ramachandra
2010-10-18 16:46             ` Sverre Rabbelier
2010-10-18 16:56               ` Jonathan Nieder
2010-10-18 17:16                 ` Ramkumar Ramachandra
2010-10-18 17:18                 ` Sverre Rabbelier
2010-10-18 17:28                   ` Jonathan Nieder
2010-10-18 18:10                     ` Sverre Rabbelier
2010-10-18 18:13                       ` Jonathan Nieder
2010-10-18 18:20                         ` Sverre Rabbelier
2010-10-18 18:25                           ` Jonathan Nieder
2010-10-18 18:35                             ` Sverre Rabbelier
2010-10-18 19:33                               ` Jonathan Nieder
2010-10-19  3:08                             ` Ramkumar Ramachandra
2010-10-19  0:40                           ` Stephen Bash
2010-10-19  1:42         ` Stephen Bash
2010-10-19  6:42           ` Ramkumar Ramachandra
2010-10-19 13:33             ` Stephen Bash
2010-10-19 14:28               ` David Michael Barr
2010-10-19 14:57                 ` Stephen Bash
2010-10-20  8:39             ` Will Palmer
2010-10-20 11:59               ` Jakub Narebski
2010-10-20 13:42                 ` Will Palmer [this message]
2010-10-20 20:44                   ` Jakub Narebski
2010-10-21  1:54                     ` mrevilgnome
2010-10-21  8:16                       ` Jakub Narebski
2010-10-21 13:49                         ` Stephen Bash
2010-10-21  9:08                     ` Will Palmer
2010-10-21 14:00                       ` Stephen Bash
2010-10-21 18:37                         ` Jakub Narebski
2010-10-21 21:27                           ` Stephen Bash
2010-10-21 22:49                             ` Jakub Narebski
2010-10-21 23:26                               ` Stephen Bash
2010-10-22 10:38                                 ` Jakub Narebski
2010-10-21 15:52                       ` Jakub Narebski
2010-10-21 16:16                         ` Jonathan Nieder
2010-10-20 14:05               ` Ramkumar Ramachandra
2010-10-20 14:21               ` Stephen Bash
2010-10-20 16:56                 ` Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287582160.2673.25.camel@wpalmer.simply-domain \
    --to=wmpalmer@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=bash@genarts.com \
    --cc=david.barr@cordelta.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=jrnieder@gmail.com \
    --cc=mstump@goatyak.com \
    --cc=srabbelier@gmail.com \
    --cc=tom@dbservice.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).