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

Re: [BUG] Destructive access to an "objects/info/alternates" repository

From
SMStefan Monnier <monnier@iro.umontreal.ca>
Date
Jan 4, 2021, 20:47 UTC
Message-ID
<jwvlfd81le8.fsf-monnier+gmane.comp.version-control.git@gnu.org>
In-Reply-To
<20210104135410.myjaygaulqnxcnsc@chatter.i7.local>
Konstantin Ryabitsev [2021-01-04 08:54:10] wrote:
Show 17 quoted lines
> I would guess that this is happening in builtin/gc.c#686 [1], where it calls
> clean_pack_garbage(). Running "git count-objects -v" shows:
>
> $ git count-objects -v
> warning: no corresponding .pack:
> /tmp/test/nongnu/.git/objects/pack/pack-0d85e74ac2f7e51ce26f281e64eb738e8182fa95.idx
> warning: no corresponding .pack:
> /tmp/test/nongnu/.git/objects/pack/pack-5fe14feff49ccdee5469af9dc94f6784e8464a6b.idx
> count: 0
> size: 0
> in-pack: 0
> packs: 0
> size-pack: 0
> prune-packable: 0
> garbage: 2
> size-garbage: 6573
> alternate: /tmp/test/nongnu/.git/objects
Ah, that'd make sense, yes.
Show 5 quoted lines
> I agree with Stefan that this is undesired behaviour, even when it only
> happens when attempting to clean up garbage -- git-gc (and git-count-objects)
> should distinguish between garbage in the parent repository and its own
> repository and not attempt any modification of the parent repository during
> gc or any other operation.
Great, so IIUC:
- this is a harmless warning
- it's considered as a bug
- so my use case should work fine in practice and is not considered as
  "too weird to be supported"
Thank you,
        Stefan
Previous: Konstantin RyabitsevNext: Konstantin Ryabitsev
Message 8 of 9 in “[BUG] Destructive access to an "objects/info/alternates" repository”
  1. Stefan MonnierDec 28, 2020
  2. Konstantin RyabitsevDec 28, 2020
  3. Stefan MonnierDec 28, 2020
  4. Stefan MonnierDec 28, 2020
  5. Konstantin RyabitsevDec 29, 2020
  6. Stefan MonnierJan 3, 2021
  7. Konstantin RyabitsevJan 4, 2021
  8. Stefan MonnierJan 4, 2021
  9. Konstantin RyabitsevJan 4, 2021

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.