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

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
Previous: Konstantin Ryabitsev
Message 7 of 7 in “Repository corruption if objects pushed in the middle of repack”
  1. Konstantin RyabitsevJun 13, 2022
  2. Taylor BlauJun 13, 2022
  3. Taylor BlauJun 13, 2022
  4. Konstantin RyabitsevJun 13, 2022
  5. Taylor BlauJun 13, 2022
  6. Konstantin RyabitsevJun 13, 2022
  7. Chris TorekJun 13, 2022

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.