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

Re: Fake linear history in a deterministic manner.

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Feb 16, 2006, 23:29 UTC
Message-ID
<46a038f90602161529r6e1855a5l41a2dbfdea7ee2a0@mail.gmail.com>
In-Reply-To
<20060216222956.GA5818@Muzzle>
On 2/17/06, Eric Wong <normalperson@yhbt.net> wrote:
Show 8 quoted lines
> Martin Langhoff <martin.langhoff@gmail.com> wrote:
> > To emulate `cvs log somepath` I need to munge history to look linear.
> > I am working on the theory that I will tell the cvs client about *one*
> > linear history, and show merges from parallel histories as a merge
> > commit, "flattened" so to speak, and with a commit message where I'll
> > list the hash and first line of each commit that it involves.
>
> I'd be interested in exporting from git to SVN with something like this.

We're hoping to release the code soon, but the truth is that it's really trivial. It was more agonizing over the fact that there's no "good" (aka "stable") algorithm for this.

Show 14 quoted lines
> > I thought briefly about delaying the decision until I see the merge,
> > and pick the leftmost, or rightmost, if there is some bias in
> > git-merge or cg-merge on putting whatever origin has on a particular
> > side. It'd mean running backwards through history and that the very
> > last merge can flip the decision entirely. Hmmm... any strategy I can
> > come up with means that each new merge throws the dice again entirely.
> >
> > Ideas?
>
> I'd actually like to do this interactively in gitk.  Just browse history
> visually and pick the path you want to choose each time there's a merge,
> and then having it output the revisions to stdout or saved to a file
> after you're done picking.  Ideally you'd be able to use saved output
> interactively, as well.

It's cool to be able to pick, but if it's for a git-svnserver implementation, you can't change your (fake) history you tell after clients have seen. So a merge that gets pushed to the repo later may contain more interesting paths, but you're bound to the lies you've told.

cheers,
martin
Previous: Eric WongNext: Junio C Hamano
Message 6 of 7 in “Fake linear history in a deterministic manner.”
  1. Martin LanghoffFeb 13, 2006
  2. Junio C HamanoFeb 13, 2006
  3. Martin LanghoffFeb 13, 2006
  4. Linus TorvaldsFeb 13, 2006
  5. Eric WongFeb 16, 2006
  6. Martin LanghoffFeb 16, 2006
  7. Junio C HamanoFeb 16, 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.