Re: [PATCH v2] remote-curl: honor --no-thin when pushing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 26, 2026, 17:52 UTC
- Message-ID
- <xmqqo6bbo4yi.fsf@gitster.g>
- In-Reply-To
- <pull.2328.v2.git.1795684746909.gitgitgadget@gmail.com>
"Julian Maurin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 10 quoted lines
> From: Julian Maurin <julian.maurin.dev@proton.me> > > "git push --no-thin" to a smart HTTP remote still sends a thin pack. > transport-helper.c does not forward the "thin" option to remote > helpers, and remote-curl always runs send-pack with --thin. > > If one pushes from a shallow, treeless partial clone > (--filter=tree:0) to an HTTPS remote, a thin push lazily fetches > every advertised tip's missing tree from the promisor one by one, > and --no-thin has no effect over HTTP to avoid it.
Incorporating this use case into the commit message makes the motivation immediately clear.
In builtin/pack-objects.c:cmd_pack_objects(), creating a thin pack in a shallow repository passes --objects-edge-aggressive to the internal rev-list walk, which visits trees of boundary commits; dropping --thin switches to --objects and avoids those lazy promisor fetches.
Will replace. Let me mark the topic as ready for 'next' unless somebody objects (but I suspect that the rest of this week is relatively slow, so I'll wait for a bit longer than usual).