🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by "kongfankaikai" Thu, 12 Nov 2026 07:49
Re: [BUG] repack --drop-filtered aborts when a filtered blob is referenced by the index
#2974
Author: "kongfankaikai"
Date: Thu, 12 Nov 2026 07:49
42 lines
12308 bytes
Hi Siddharth,

Thanks for the explanation and the update!

It's great to know that a fix is already being worked on. I'll keep an eye on the discussion.

Thanks



原始邮件
发件人:Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
发件时间:2026年11月12日 15:29
收件人:kongfankaikai <kongfankaikai@foxmail.com>
抄送:git <git@vger.kernel.org>, Samuel Bronson <naesten@gmail.com>, Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
主题:Re: [BUG] repack --drop-filtered aborts when a filtered blob is referenced by the index


Hi,

On Thu, Nov 12, 2026 at 12:51:07AM +0800, kongfankaikai wrote:
> When a blob selected by the filter for dropping is referenced by the
> current index, Git aborts the entire repack with:
>
> `fatal: cannot drop 'path/to/large-file.bin' (object-id): it is
> referenced by the current index`
>
> This stops other eligible blobs from being dropped, even though those
> blobs are not referenced by the index.

Thanks for the report. This is a known limitation and a fix is already
planned.

Samuel Bronson ran into exactly the same thing on a real llvm-project
clone and sent an RFC patch for it in September:

  https://lore.kernel.org/git/s0vqzjavw8p.fsf@gmail.com/

and I agreed with the direction there:

  https://lore.kernel.org/git/CAGWgyh9B=re06aofii9VFB1xOwEeTtxYE=7T14m9WFAx1ORpMg@mail.gmail.com/

> Is there a specific reason this condition is treated as fatal rather
> than skipping the affected objects?
>
> This behavior would be especially helpful for partial clones with
> large working trees.

No correctness reason. The guard only avoids dropping a blob that the
next command would lazy-fetch right back, so such a blob is never at
risk. Aborting was simply a conservative version of the guard, and as
you and Samuel point out it is a poor trade-off.

The fix is to replace the die() with a warning and drop the remaining
eligible blobs. I am working on this and will post it to the list.

Thanks,
Siddharth 



Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads