Skip to content

pr-2328/JulianMaurin/push-no-thin-over-http-v2

tagged this 26 Nov 09:19
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.

"thin" was left out of the forwarded options of ef08ef9ea0
(remote-helpers: Support custom transport options, 2009-10-30) after
review noted that --no-thin did nothing on any transport at the time.
f7c815c3ee (push: respect --no-thin, 2013-08-12) made it work again,
but only for the native transports.

Forward "thin" to helpers and teach remote-curl to honor it. A helper
that does not know the option answers "unsupported", which push
ignores, so it keeps working as before.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Julian Maurin <julian.maurin.dev@proton.me>

Submitted-As: https://lore.kernel.org/git/pull.2328.v2.git.1795684746909.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2328.git.1795595886592.gitgitgadget@gmail.com
Assets 2
Loading