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

Re: Imports without Tariffs

From
Jeff King <peff@peff.net>
Date
Oct 13, 2007, 07:57 UTC
Message-ID
<20071013075723.GA27533@coredump.intra.peff.net>
In-Reply-To
<1240801C-F4CC-4290-8C3D-2038F1957DF3@MIT.EDU>
On Sat, Oct 13, 2007 at 12:30:09AM -0400, Michael Witten wrote:
>> except that git-rebase is smart enough to realize that C == C' and skip
>> it (so it's a "safe" way of moving forward).
>
> This is good to know! The documentation should mention this case!

Yes, it probably should. Can you submit a patch describing the behavior where you think it ought to go?

> Basically, the imported cvs history should be treated like
> a remote that's being tracked. It seems like the solution
> I proposed kind of does this and would work for other SCM
> imports too.

I think it's an interesting avenue to pursue, though I would worry a little about robustness. I like the fact that after rebasing, the commits have done a complete git->cvs->git loop and look identical, so I am sure everything made it through intact. But perhaps I'm just being paranoid.

As an alternate idea, why not try to have the CVS commit contain all information necessary to create a particular git commit. IOW, describe all of the data that goes into the commit hash as textual comments in the CVS commit (committer name/time, author name/time). And then theoretically git-cvsimport can reconstruct the exact same commits again, and your git->cvs->git merge really _will_ be a fastforward.

> Unfortunately, they are the ones running the servers; I have to do my
> git work behind the scenes.

I've been in the same boat, and just used the rebase trick I described. Of course it was a very tiny project, so I didn't mind losing some of the full power of git.

-Peff
Previous: Michael WittenNext: Michael Witten
Message 4 of 7 in “(unknown)”
  1. Michael WittenOct 13, 2007
  2. Jeff KingOct 13, 2007
  3. Michael WittenOct 13, 2007
  4. Jeff KingOct 13, 2007
  5. Michael WittenOct 13, 2007
  6. Jeff KingOct 14, 2007
  7. Michael WittenOct 14, 2007

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.