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

Re: Passing revs to git-bundle-create via stdin

From
Junio C Hamano <gitster@pobox.com>
Date
May 24, 2017, 01:44 UTC
Message-ID
<xmqqwp97hvvi.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170523164641.u3rd7bgc7ifvu2su@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> I think what's happening is that git-bundle actually runs _two_
> traversals using the command-line arguments. ...
> ... It was just a way of confirming my
> guess about the double-read.
>
> The real solutions I can think of are:
>
>   1. Teach git-bundle not to require the double-read. I'm not sure why
>      it's written the way it is, but presumably it would be tricky to
>      undo it (or we would have just written it the other way in the
>      first place!)

If I remember correctly, the reason why it does the double-read is because it wants to cope with things like "--since". There is no explicit bottom of the DAG specified on the command line, and the first one (without "--objects") is done to find "prerequisites" that are written in the header.

Then the packdata is generated, which does another traversal (this time with "--objects" option).

So perhaps the right way to fix it is to keep the first traversal as-is, but update the second one (I think write-bundle-refs is the culprit) so that it does not use the user-supplied command line as-is; instead it should use the positive end of the history from the command line with the negative end set to these "prerequisites" commits.

I said "command line" in the above, but read that as "end user input"; the list of rev-list command line arguments given from the standard input is exactly the same deal.

Previous: Jeff KingNext: Junio C Hamano
Message 3 of 4 in “Passing revs to git-bundle-create via stdin”
  1. chMay 22, 2017
  2. Jeff KingMay 23, 2017
  3. Junio C HamanoMay 24, 2017
  4. Junio C HamanoMay 25, 2017

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.