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

Re: Better interoperability with Bitkeeper for fast-import/-export

From
Elijah Newren <newren@gmail.com>
Date
Jul 3, 2018, 21:27 UTC
Message-ID
<CABPp-BFbDx4z2TiqiexyNJzA5UC5D7ZH6Uw-XLXeG3tDCHRKog@mail.gmail.com>
In-Reply-To
<E37C3A33-489B-4FEB-9170-097514B41317@redfish-solutions.com>
Hi Philip,

On Tue, Jul 3, 2018 at 1:40 PM, Philip Prindeville <philipp_subx@redfish-solutions.com> wrote:

Show 7 quoted lines
> Hi.
>
> I tried to import into git a repo that I was working on (because it just seemed easier), but when I tried to export the repo back out after making my changes I found it choking on a few things.
>
> It was explained to me (by the Bitkeeper folks) that git meta-data doesn’t accurately track file moves…  If a file disappears from one place and reappears in another with the same contents, that’s assumed to be a move.
>
> Given that “git mv” is an explicit action, I’m not sure why that wouldn’t be explicitly tracked.

Not a full explanation, but see https://git-scm.com/book/en/v2/Git-Internals-Moving-Files

> But I’ve not looked too closely under the covers about how git represents stuff, so maybe there’s more to it than I’m assuming.
>
> During an export using “-M” and “-C”, Bitkeeper complained:
Why would you add -C?  Does bitkeeper also track copies?
Show 5 quoted lines
> fast-import: line 'R ports/winnt/libntp/nt_clockstuff.c ports/winnt/ntpd/nt_clockstuff.c' not supported
>
> so I tried removing those two options, and it got further, this time stalling on:
>
> fast-import: Unknown command: tag ntp-stable

If the fast-import command you are using can't read tags, then perhaps you should report that to the authors of the fast-import tool you are using and/or only feed branches to your fast-export command.

Show 5 quoted lines
> I like git, mostly because I’ve used it a lot more… and I like the GitHub service.  I use Bitkeeper because a few projects I work on are already set up to use it and it’s not my call whether it’s worth the effort to make the conversion or live with it.
>
> So… this is an appeal for both to play better together.
>
> What’s involved in getting git to track file/directory moves/renames so that it’s palatable to Bitkeeper?

Not tracking file/directory moves/renames wasn't an oversight but a fundamental design decision; see e.g. https://public-inbox.org/git/Pine.LNX.4.64.0510211826350.10477@g5.osdl.org/.

However, supposing that we did track renames, how would we tell bitkeeper? Well, we'd print out a line that looks like this in the fast-export:

'R ports/winnt/libntp/nt_clockstuff.c ports/winnt/ntpd/nt_clockstuff.c'

which is precisely the line that bitkeeper's fast-import was choking on. So, it sounds like they don't support importing rename information (or at least the version of fast-import you're using doesn't). I think this is where the bug is; you'll probably want to report it to whoever maintains the fast-import command that is choking on this line.

Once that's fixed, you can export from git with the -M flag, and from that output, there'll be no way to tell whether the original repository tracked renames or detected them after the fact.

Hope that helps, Elijah

Previous: Philip PrindevilleNext: Philip Prindeville
Message 2 of 3 in “Better interoperability with Bitkeeper for fast-import/-export”
  1. Philip PrindevilleJul 3, 2018
  2. Elijah NewrenJul 3, 2018
  3. Philip PrindevilleJul 3, 2018

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.