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

Re: [Bug] git fetch --dry-run --filter makes changes to .git/config

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 18, 2025, 20:28 UTC
Message-ID
<xmqqms6r7bf7.fsf@gitster.g>
In-Reply-To
<20250918192045.GA1187769@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> It would probably be better if it established a separate tmp-objdir area
> (like we do for pushes before we commit to storing them), fetched the
> objects into that, and then threw away the result. That technique did
> not exist back when "fetch --dry-run" was added, but it probably
> wouldn't be too hard to do now.

It is true that the quarantine mechanism did not exist. But I am not sure if a true dryness is actually better. We do verify that the incoming objects thrown at us by the other side are healthy, so the only difference is that our object database will have extra unreachable objects that are known to be healthy between the time you run a dry fetch and the time you then run a real one. And these extra objects that are healthy will help your real fetch go faster if the dry fetch and real fetch are run back to back thanks to "do we have all the necessary objects already, just that they may not be connected to the refs yet?" check.

So it may not be hard with the building blocks, but I am not sure if it is a good idea to do so in the first place.

Thanks.
Previous: Jeff KingNext: Jeff King
Message 5 of 10 in “[Bug] git fetch --dry-run --filter makes changes to .git/config”
  1. Kevin PuetzSep 17, 2025
  2. brian m. carlsonSep 17, 2025
  3. Kevin PuetzSep 17, 2025
  4. Jeff KingSep 18, 2025
  5. Junio C HamanoSep 18, 2025
  6. Jeff KingSep 18, 2025
  7. Junio C HamanoSep 18, 2025
  8. Kevin PuetzSep 18, 2025
  9. rsbecker@nexbridge.comSep 18, 2025
  10. Kevin PuetzSep 19, 2025

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.