git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Andre Loconte <andre.loconte@protonmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git bundle create produces inconsistent bundle
Date: Tue, 7 Jan 2020 13:03:46 -0500	[thread overview]
Message-ID: <20200107180346.GA48806@coredump.intra.peff.net> (raw)
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

      reply	other threads:[~2020-01-07 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 17:44 Git bundle create produces inconsistent bundle Andre Loconte
2020-01-07 18:03 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200107180346.GA48806@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=andre.loconte@protonmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).