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

Re: git-cvsimport gets parents wrong for branches

From
EElrond <elrond+kernel.org@samba-tng.org>
Date
Jul 4, 2006, 11:03 UTC
Message-ID
<20060704110313.GC24572@memak.tu-darmstadt.de>
In-Reply-To
<Pine.LNX.4.63.0607041007391.29667@wbgn013.biozentrum.uni-wuerzburg.de>
On Tue, Jul 04, 2006 at 10:09:18AM +0200, Johannes Schindelin wrote:
Show 11 quoted lines
> Hi,
> 
> On Tue, 4 Jul 2006, Martin Langhoff wrote:
> 
> > It is pretty hard to get that one right in any case, as there are
> > cases where the new branch starts from something that is not a commit
> > in the parent (from GIT's perspective).
> 
> But it should be easy to introduce a faked commit, which just contains 
> those versions (and takes the newest commit touching any of these file 
> versions as branch point).

Of couye in theory, (if cvs was used sanely), the base of each branch should be a commit on the parent-branch. But as we all know, cvs allows pathologic cases. (My script doesn't create such a case, it's sanely representable in git without any fake commits.)

So now for the patholigic cases (when they're solved, the main issue is solved too):

Of course, the base version for a branch can be turned into a tree (should be easy: cvsps's first changeset of the branch has the previous revisions of each file). This tree can also be turned into a fake commit... just which parent should our new fake commit have?

My current simple answer is: The commit on the parent branch with the most matching number of files, so that the diff, that the fake commit introduces has the least number of files.

In the non-patholoc case, the fake commit would introduce no diff at all and should be dropped.

Of couse I have no idea, how hard it would be to implement this. And in reality, it would be cvsps's job to do that.

    Elrond
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 6 in “git-cvsimport gets parents wrong for branches”
  1. ElrondJul 3, 2006
  2. Martin LanghoffJul 3, 2006
  3. Johannes SchindelinJul 4, 2006
  4. ElrondJul 4, 2006
  5. Johannes SchindelinJul 4, 2006
  6. ElrondJul 4, 2006

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.