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

Re: Git bundle create produces inconsistent bundle

From
Jeff King <peff@peff.net>
Date
Jan 7, 2020, 18:03 UTC
Message-ID
<20200107180346.GA48806@coredump.intra.peff.net>
In-Reply-To
<QBxpUR_NauPk0G8X2KKsqzlrfyxNuA4OoNR3Dm1KpHMNEELiSUxKr_IDM_qghObDt4aVv-bjg1ZQtCYRgxArdGsK52wCuO1LbsqzlHBto-k=@protonmail.com>
On Tue, Jan 07, 2020 at 05:44:47PM +0000, Andre Loconte wrote:
> I am running into an issue where "git bundle create" doesn't always
> produce the same bundle, provided the exact same arguments and the
> exact same repo.

This is expected. A bundle contains a packfile, and the packfile generation is sensitive to several things:

  - the delta search is threaded (to the same number of threads as you
    have CPUs). Try "git -c pack.threads=1 bundle create ...".
  - we try to reuse on-disk deltas when possible. So the exact set of
    packs you have (or which objects are loose) may impact the result
    slightly. So between two different clones of the same repository,
    I'd expect different results.

Possibly repacking first with "git -c pack.threads=1 repack -adf" might get you an identical on-disk state in two different clones (assuming you have the same refs and reflogs in each!).

But as you can see, we don't in general expect packfiles to be byte-stable (this is also the reason that git clones aren't easily resumable).

-Peff
Previous: Andre Loconte
Message 2 of 2 in “Git bundle create produces inconsistent bundle”
  1. Andre LoconteJan 7, 2020
  2. Jeff KingJan 7, 2020

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.