Re: Repository corruption if objects pushed in the middle of repack
- From
Chris Torek <chris.torek@gmail.com>
- Date
- Jun 13, 2022, 22:26 UTC
- Message-ID
- <CAPx1GveKAaO1NMRZvcoj5nGm4Cd=A5CLkq7u-eOYtRvU2YVaGw@mail.gmail.com>
- In-Reply-To
- <20220613214514.udtn35w7j6q2lrbh@meerkat.local>
On Mon, Jun 13, 2022 at 3:07 PM Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
Show 5 quoted lines
> It's just strange that we've been doing something similar like this to tens of > thousands of repositories (e.g. those on codeaurora.org), and it's the first > time that I see such consistent corruption manifest itself. If I were to go > with my gut instinct, I would blame the shallow checkout on the client, but I > don't have any good way of explaining why that would be the culprit either.
One thing that *is* different with a shallow clone followed by push, is that the `git push` pushes a lot of objects unnecessarily because the client doesn't have the commits to prove that they're unnecessary. So the delivered pack file has a *lot* of redundant objects.
(A `--depth 2` clone usually omits most redundant objects, which is a reason to use `--depth 2` instead of `--depth 1`.)
Chris