{"thread":{"id":"66831","subject":"Re: [BUG] repack --drop-filtered aborts when a filtered blob is referenced by the index","startedAt":"2026-11-12T07:49:09Z","lastAt":"2026-11-12T07:49:09Z","messageCount":1,"participants":["kongfankaikai"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"558279","messageId":"tencent_EB6E67B22EC8C9D00D0A7D062B62BB95ED05@qq.com","threadId":"66831","inReplyTo":null,"subject":"Re: [BUG] repack --drop-filtered aborts when a filtered blob is referenced by the index","fromName":"kongfankaikai","fromEmail":"kongfankaikai@foxmail.com","sentAt":"2026-11-12T07:49:09Z","receivedAt":"2026-11-12T07:49:09Z","isPatch":false,"sender":{"key":"kongfankaikai@foxmail.com","avatar":null},"body":"Hi Siddharth,\n\nThanks for the explanation and the update!\n\nIt's great to know that a fix is already being worked on. I'll keep an eye on the discussion.\n\nThanks\n\n\n\n原始邮件\n发件人：Siddharth Shrimali <r.siddharth.shrimali@gmail.com>\n发件时间：2026年11月12日 15:29\n收件人：kongfankaikai <kongfankaikai@foxmail.com>\n抄送：git <git@vger.kernel.org>, Samuel Bronson <naesten@gmail.com>, Siddharth Shrimali <r.siddharth.shrimali@gmail.com>\n主题：Re: [BUG] repack --drop-filtered aborts when a filtered blob is referenced by the index\n\n\nHi,\n\nOn Thu, Nov 12, 2026 at 12:51:07AM +0800, kongfankaikai wrote:\n> When a blob selected by the filter for dropping is referenced by the\n> current index, Git aborts the entire repack with:\n>\n> `fatal: cannot drop 'path/to/large-file.bin' (object-id): it is\n> referenced by the current index`\n>\n> This stops other eligible blobs from being dropped, even though those\n> blobs are not referenced by the index.\n\nThanks for the report. This is a known limitation and a fix is already\nplanned.\n\nSamuel Bronson ran into exactly the same thing on a real llvm-project\nclone and sent an RFC patch for it in September:\n\n  https://lore.kernel.org/git/s0vqzjavw8p.fsf@gmail.com/\n\nand I agreed with the direction there:\n\n  https://lore.kernel.org/git/CAGWgyh9B=re06aofii9VFB1xOwEeTtxYE=7T14m9WFAx1ORpMg@mail.gmail.com/\n\n> Is there a specific reason this condition is treated as fatal rather\n> than skipping the affected objects?\n>\n> This behavior would be especially helpful for partial clones with\n> large working trees.\n\nNo correctness reason. The guard only avoids dropping a blob that the\nnext command would lazy-fetch right back, so such a blob is never at\nrisk. Aborting was simply a conservative version of the guard, and as\nyou and Samuel point out it is a poor trade-off.\n\nThe fix is to replace the die() with a warning and drop the remaining\neligible blobs. I am working on this and will post it to the list.\n\nThanks,\nSiddharth \n\n\n\n"}]}