* [PATCH] remote-curl: honor --no-thin when pushing
@ 2026-11-25 8:38 Julian Maurin via GitGitGadget
2026-11-25 17:57 ` Junio C Hamano
2026-11-26 9:19 ` [PATCH v2] " Julian Maurin via GitGitGadget
0 siblings, 2 replies; 5+ messages in thread
From: Julian Maurin via GitGitGadget @ 2026-11-25 8:38 UTC (permalink / raw)
To: git
Cc: Jeff King, brian m. carlson, Patrick Steinhardt, Julian Maurin,
Julian Maurin
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.
"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.
Signed-off-by: Julian Maurin <julian.maurin.dev@proton.me>
---
remote-curl: honor --no-thin when pushing
"git push --no-thin" over smart HTTP was ignored and a thin pack was
sent anyway, which has been corrected.
I ran into this in production, pushing from a shallow, treeless partial
clone (--filter=tree:0) to an HTTPS remote. In a shallow repository a
thin push reads the tree of every advertised tip it has locally, and
each missing tree is lazily fetched from the promisor remote, one fetch
per tree. --no-thin avoids that work, but has no effect over HTTP.
A small reproduction with the test suite's httpd (400 commits, 40
advertised refs, a --depth=180 --filter=tree:0 clone pushing a merge):
default push: 37 lazy fetches
--no-thin, without this patch: 37 lazy fetches
--no-thin, with this patch: 0 lazy fetches
Helpers with the "connect" capability (ext::, fd::) already honor
--no-thin, as the native transport code takes over their connection.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2328%2FJulianMaurin%2Fpush-no-thin-over-http-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2328/JulianMaurin/push-no-thin-over-http-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2328
Documentation/gitremote-helpers.adoc | 4 ++++
remote-curl.c | 8 ++++++++
t/t5541-http-push-smart.sh | 17 +++++++++++++++++
transport-helper.c | 1 -
4 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/Documentation/gitremote-helpers.adoc b/Documentation/gitremote-helpers.adoc
index 39cdece16e..8203ef497c 100644
--- a/Documentation/gitremote-helpers.adoc
+++ b/Documentation/gitremote-helpers.adoc
@@ -542,6 +542,10 @@ set by Git if the remote helper has the 'option' capability.
transaction. If successful, all refs will be updated, or none will. If the
remote side does not support this capability, the push will fail.
+'option thin' {'true'|'false'}::
+ When pushing, request the helper to send a thin pack (see
+ `--thin` in linkgit:git-pack-objects[1]).
+
'option object-format true'::
Indicate that the caller wants hash algorithm information
to be passed back from the remote. This mode is used when fetching
diff --git a/remote-curl.c b/remote-curl.c
index 2c35dd5240..8309d9d2a4 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -184,6 +184,14 @@ static int set_option(const char *name, size_t namelen, const char *value)
else
return -1;
return 0;
+ } else if (!strncmp(name, TRANS_OPT_THIN, namelen)) {
+ if (!strcmp(value, "true"))
+ options.thin = 1;
+ else if (!strcmp(value, "false"))
+ options.thin = 0;
+ else
+ return -1;
+ return 0;
} else if (!strncmp(name, "push-option", namelen)) {
if (*value != '"')
string_list_append(&options.push_options, value);
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh
index 8c34833027..280b2d9078 100755
--- a/t/t5541-http-push-smart.sh
+++ b/t/t5541-http-push-smart.sh
@@ -253,6 +253,23 @@ test_expect_success 'push --atomic fails on server-side errors' '
test_grep "^ ! .*rejected.* atomic -> atomic .*atomic transaction failed" output
'
+test_expect_success 'push --[no-]thin is passed to pack-objects' '
+ d=$HTTPD_DOCUMENT_ROOT_PATH/no-thin.git &&
+ git init --bare "$d" &&
+ test_config -C "$d" http.receivepack true &&
+ up="$HTTPD_URL"/smart/no-thin.git &&
+ git push "$up" main &&
+
+ test_commit thin-default &&
+ GIT_TRACE2_EVENT="$PWD/trace-thin" git push "$up" main &&
+ test_subcommand_flex git pack-objects --thin <trace-thin &&
+
+ test_commit thin-disabled &&
+ GIT_TRACE2_EVENT="$PWD/trace-no-thin" git push --no-thin "$up" main &&
+ test_subcommand_flex git pack-objects <trace-no-thin &&
+ test_subcommand_flex ! git pack-objects --thin <trace-no-thin
+'
+
test_expect_success 'push --all can push to empty repo' '
d=$HTTPD_DOCUMENT_ROOT_PATH/empty-all.git &&
git init --bare "$d" &&
diff --git a/transport-helper.c b/transport-helper.c
index d5a064d386..6052407b9a 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -275,7 +275,6 @@ static int disconnect_helper(struct transport *transport)
static const char *unsupported_options[] = {
TRANS_OPT_UPLOADPACK,
TRANS_OPT_RECEIVEPACK,
- TRANS_OPT_THIN,
TRANS_OPT_KEEP
};
base-commit: 03b41523c576f26ad34085378717a0c1b287470f
--
gitgitgadget
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] remote-curl: honor --no-thin when pushing 2026-11-25 8:38 [PATCH] remote-curl: honor --no-thin when pushing Julian Maurin via GitGitGadget @ 2026-11-25 17:57 ` Junio C Hamano 2026-11-25 20:13 ` Julian Maurin 2026-11-26 9:19 ` [PATCH v2] " Julian Maurin via GitGitGadget 1 sibling, 1 reply; 5+ messages in thread From: Junio C Hamano @ 2026-11-25 17:57 UTC (permalink / raw) To: Julian Maurin via GitGitGadget Cc: git, Jeff King, brian m. carlson, Patrick Steinhardt, Julian Maurin, Julian Maurin "Julian Maurin via GitGitGadget" <gitgitgadget@gmail.com> writes: > 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. > > "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. > > Signed-off-by: Julian Maurin <julian.maurin.dev@proton.me> > --- Sounds like a clean fix. > I ran into this in production, pushing from a shallow, treeless partial > clone (--filter=tree:0) to an HTTPS remote. In a shallow repository a > thin push reads the tree of every advertised tip it has locally, and > each missing tree is lazily fetched from the promisor remote, one fetch > per tree. --no-thin avoids that work, but has no effect over HTTP. Some of the supporting materials under the three-dash line, like the use case that benefits from avoiding lazy tree fetches from a shallow, treeless partial clone, make the motivation very clear, and may want to be included in the commit log message, perhaps in a bit more condensed form? Here is my attempt. 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. > diff --git a/Documentation/gitremote-helpers.adoc b/Documentation/gitremote-helpers.adoc > index 39cdece16e..8203ef497c 100644 > --- a/Documentation/gitremote-helpers.adoc > +++ b/Documentation/gitremote-helpers.adoc > @@ -542,6 +542,10 @@ set by Git if the remote helper has the 'option' capability. > transaction. If successful, all refs will be updated, or none will. If the > remote side does not support this capability, the push will fail. > > +'option thin' {'true'|'false'}:: > + When pushing, request the helper to send a thin pack (see > + `--thin` in linkgit:git-pack-objects[1]). > + > 'option object-format true':: > Indicate that the caller wants hash algorithm information > to be passed back from the remote. This mode is used when fetching > diff --git a/remote-curl.c b/remote-curl.c > index 2c35dd5240..8309d9d2a4 100644 > --- a/remote-curl.c > +++ b/remote-curl.c > @@ -184,6 +184,14 @@ static int set_option(const char *name, size_t namelen, const char *value) > else > return -1; > return 0; > + } else if (!strncmp(name, TRANS_OPT_THIN, namelen)) { > + if (!strcmp(value, "true")) > + options.thin = 1; > + else if (!strcmp(value, "false")) > + options.thin = 0; > + else > + return -1; > + return 0; The above two hunks match with each other, naturally. In remote-curl.c:cmd_main(), '.thin' of 'options' defaults to 1 (side note: I didn't know that ;-)), and push_git() passes "--thin" to send-pack only when '.thin' is set. Honoring 'true' and 'false' here while returning -1 for invalid values matches the surrounding boolean options in set_option(). It is an unrelated tangent, but the use of strncmp() with namelen means set_option("t", 1, "true") would allow setting 'thin' to 'true'. Git internally always sends the full option name, so it does not cause any problem in practice, and it certainly is the right thing for this patch to do to imitate the surrounding code. But we may want to take another look at these uses of strncmp() when the dust settles (#leftoverbits). > diff --git a/transport-helper.c b/transport-helper.c > index d5a064d386..6052407b9a 100644 > --- a/transport-helper.c > +++ b/transport-helper.c > @@ -275,7 +275,6 @@ static int disconnect_helper(struct transport *transport) > static const char *unsupported_options[] = { > TRANS_OPT_UPLOADPACK, > TRANS_OPT_RECEIVEPACK, > - TRANS_OPT_THIN, > TRANS_OPT_KEEP > }; Running 'git grep TRANS_OPT_THIN' tells me that builtin/push.c is the only thing that sets TRANS_OPT_THIN via transport_set_option(). We used to claim that this was unsupported, but when push asks to use it, we now pass it through. set_helper_option() notices that the boolean_options[] array still has this token, and sets 'option thin true' or 'option thin false' depending on the value and calls strbuf_set_helper_option() to send it out. It is a bit surprising that there is absolutely nothing else that needs to be added to support the option, but given that this was about resurrecting a feature that already exists but was left castrated due to a historical mistake, it is an understandable confusion on the reader's side ;-) Looking good. Thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] remote-curl: honor --no-thin when pushing 2026-11-25 17:57 ` Junio C Hamano @ 2026-11-25 20:13 ` Julian Maurin 0 siblings, 0 replies; 5+ messages in thread From: Julian Maurin @ 2026-11-25 20:13 UTC (permalink / raw) To: Junio C Hamano Cc: Julian Maurin via GitGitGadget, git, Jeff King, brian m. carlson, Patrick Steinhardt > Here is my attempt. > > 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. Thanks, that reads better than what I had. I'll take it as is in v2. > But we may want to take another look at these uses of strncmp() when > the dust settles (#leftoverbits). Agreed, that is for a separate patch. Thanks for the review. Julian On Wednesday, November 25th, 2026 at 18:57, Junio C Hamano <gitster@pobox.com> wrote: > "Julian Maurin via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > 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. > > > > "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. > > > > Signed-off-by: Julian Maurin <julian.maurin.dev@proton.me> > > --- > > Sounds like a clean fix. > > > I ran into this in production, pushing from a shallow, treeless partial > > clone (--filter=tree:0) to an HTTPS remote. In a shallow repository a > > thin push reads the tree of every advertised tip it has locally, and > > each missing tree is lazily fetched from the promisor remote, one fetch > > per tree. --no-thin avoids that work, but has no effect over HTTP. > > Some of the supporting materials under the three-dash line, like the use > case that benefits from avoiding lazy tree fetches from a shallow, > treeless partial clone, make the motivation very clear, and may want to > be included in the commit log message, perhaps in a bit more condensed > form? Here is my attempt. > > 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. > > > diff --git a/Documentation/gitremote-helpers.adoc b/Documentation/gitremote-helpers.adoc > > index 39cdece16e..8203ef497c 100644 > > --- a/Documentation/gitremote-helpers.adoc > > +++ b/Documentation/gitremote-helpers.adoc > > @@ -542,6 +542,10 @@ set by Git if the remote helper has the 'option' capability. > > transaction. If successful, all refs will be updated, or none will. If the > > remote side does not support this capability, the push will fail. > > > > +'option thin' {'true'|'false'}:: > > + When pushing, request the helper to send a thin pack (see > > + `--thin` in linkgit:git-pack-objects[1]). > > + > > 'option object-format true':: > > Indicate that the caller wants hash algorithm information > > to be passed back from the remote. This mode is used when fetching > > diff --git a/remote-curl.c b/remote-curl.c > > index 2c35dd5240..8309d9d2a4 100644 > > --- a/remote-curl.c > > +++ b/remote-curl.c > > @@ -184,6 +184,14 @@ static int set_option(const char *name, size_t namelen, const char *value) > > else > > return -1; > > return 0; > > + } else if (!strncmp(name, TRANS_OPT_THIN, namelen)) { > > + if (!strcmp(value, "true")) > > + options.thin = 1; > > + else if (!strcmp(value, "false")) > > + options.thin = 0; > > + else > > + return -1; > > + return 0; > > The above two hunks match with each other, naturally. > > In remote-curl.c:cmd_main(), '.thin' of 'options' defaults to 1 (side > note: I didn't know that ;-)), and push_git() passes "--thin" to send-pack > only when '.thin' is set. Honoring 'true' and 'false' here while > returning -1 for invalid values matches the surrounding boolean options > in set_option(). > > It is an unrelated tangent, but the use of strncmp() with namelen means > set_option("t", 1, "true") would allow setting 'thin' to 'true'. Git > internally always sends the full option name, so it does not cause any > problem in practice, and it certainly is the right thing for this patch > to do to imitate the surrounding code. But we may want to take another > look at these uses of strncmp() when the dust settles (#leftoverbits). > > > diff --git a/transport-helper.c b/transport-helper.c > > index d5a064d386..6052407b9a 100644 > > --- a/transport-helper.c > > +++ b/transport-helper.c > > @@ -275,7 +275,6 @@ static int disconnect_helper(struct transport *transport) > > static const char *unsupported_options[] = { > > TRANS_OPT_UPLOADPACK, > > TRANS_OPT_RECEIVEPACK, > > - TRANS_OPT_THIN, > > TRANS_OPT_KEEP > > }; > > Running 'git grep TRANS_OPT_THIN' tells me that builtin/push.c is the > only thing that sets TRANS_OPT_THIN via transport_set_option(). We used > to claim that this was unsupported, but when push asks to use it, we now > pass it through. > > set_helper_option() notices that the boolean_options[] array still has > this token, and sets 'option thin true' or 'option thin false' depending > on the value and calls strbuf_set_helper_option() to send it out. > > It is a bit surprising that there is absolutely nothing else that needs > to be added to support the option, but given that this was about > resurrecting a feature that already exists but was left castrated due to > a historical mistake, it is an understandable confusion on the reader's > side ;-) > > Looking good. > > Thanks. > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] remote-curl: honor --no-thin when pushing 2026-11-25 8:38 [PATCH] remote-curl: honor --no-thin when pushing Julian Maurin via GitGitGadget 2026-11-25 17:57 ` Junio C Hamano @ 2026-11-26 9:19 ` Julian Maurin via GitGitGadget 2026-11-26 17:52 ` Junio C Hamano 1 sibling, 1 reply; 5+ messages in thread From: Julian Maurin via GitGitGadget @ 2026-11-26 9:19 UTC (permalink / raw) To: git Cc: Jeff King, brian m. carlson, Patrick Steinhardt, Julian Maurin, Julian Maurin, Julian Maurin 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> --- remote-curl: honor --no-thin when pushing Changes since v1: * Added the use case (a push from a shallow, treeless partial clone) to the commit message, in Junio's wording. Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2328%2FJulianMaurin%2Fpush-no-thin-over-http-v2 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2328/JulianMaurin/push-no-thin-over-http-v2 Pull-Request: https://github.com/gitgitgadget/git/pull/2328 Range-diff vs v1: 1: c3fb36cb75 ! 1: 8732cf64fc remote-curl: honor --no-thin when pushing @@ Commit message 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. @@ Commit message 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> ## Documentation/gitremote-helpers.adoc ## Documentation/gitremote-helpers.adoc | 4 ++++ remote-curl.c | 8 ++++++++ t/t5541-http-push-smart.sh | 17 +++++++++++++++++ transport-helper.c | 1 - 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Documentation/gitremote-helpers.adoc b/Documentation/gitremote-helpers.adoc index 39cdece16e..8203ef497c 100644 --- a/Documentation/gitremote-helpers.adoc +++ b/Documentation/gitremote-helpers.adoc @@ -542,6 +542,10 @@ set by Git if the remote helper has the 'option' capability. transaction. If successful, all refs will be updated, or none will. If the remote side does not support this capability, the push will fail. +'option thin' {'true'|'false'}:: + When pushing, request the helper to send a thin pack (see + `--thin` in linkgit:git-pack-objects[1]). + 'option object-format true':: Indicate that the caller wants hash algorithm information to be passed back from the remote. This mode is used when fetching diff --git a/remote-curl.c b/remote-curl.c index 2c35dd5240..8309d9d2a4 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -184,6 +184,14 @@ static int set_option(const char *name, size_t namelen, const char *value) else return -1; return 0; + } else if (!strncmp(name, TRANS_OPT_THIN, namelen)) { + if (!strcmp(value, "true")) + options.thin = 1; + else if (!strcmp(value, "false")) + options.thin = 0; + else + return -1; + return 0; } else if (!strncmp(name, "push-option", namelen)) { if (*value != '"') string_list_append(&options.push_options, value); diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index 8c34833027..280b2d9078 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -253,6 +253,23 @@ test_expect_success 'push --atomic fails on server-side errors' ' test_grep "^ ! .*rejected.* atomic -> atomic .*atomic transaction failed" output ' +test_expect_success 'push --[no-]thin is passed to pack-objects' ' + d=$HTTPD_DOCUMENT_ROOT_PATH/no-thin.git && + git init --bare "$d" && + test_config -C "$d" http.receivepack true && + up="$HTTPD_URL"/smart/no-thin.git && + git push "$up" main && + + test_commit thin-default && + GIT_TRACE2_EVENT="$PWD/trace-thin" git push "$up" main && + test_subcommand_flex git pack-objects --thin <trace-thin && + + test_commit thin-disabled && + GIT_TRACE2_EVENT="$PWD/trace-no-thin" git push --no-thin "$up" main && + test_subcommand_flex git pack-objects <trace-no-thin && + test_subcommand_flex ! git pack-objects --thin <trace-no-thin +' + test_expect_success 'push --all can push to empty repo' ' d=$HTTPD_DOCUMENT_ROOT_PATH/empty-all.git && git init --bare "$d" && diff --git a/transport-helper.c b/transport-helper.c index d5a064d386..6052407b9a 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -275,7 +275,6 @@ static int disconnect_helper(struct transport *transport) static const char *unsupported_options[] = { TRANS_OPT_UPLOADPACK, TRANS_OPT_RECEIVEPACK, - TRANS_OPT_THIN, TRANS_OPT_KEEP }; base-commit: 03b41523c576f26ad34085378717a0c1b287470f -- gitgitgadget ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] remote-curl: honor --no-thin when pushing 2026-11-26 9:19 ` [PATCH v2] " Julian Maurin via GitGitGadget @ 2026-11-26 17:52 ` Junio C Hamano 0 siblings, 0 replies; 5+ messages in thread From: Junio C Hamano @ 2026-11-26 17:52 UTC (permalink / raw) To: Julian Maurin via GitGitGadget Cc: git, Jeff King, brian m. carlson, Patrick Steinhardt, Julian Maurin, Julian Maurin "Julian Maurin via GitGitGadget" <gitgitgadget@gmail.com> writes: > 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). ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-26 17:52 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-25 8:38 [PATCH] remote-curl: honor --no-thin when pushing Julian Maurin via GitGitGadget 2026-11-25 17:57 ` Junio C Hamano 2026-11-25 20:13 ` Julian Maurin 2026-11-26 9:19 ` [PATCH v2] " Julian Maurin via GitGitGadget 2026-11-26 17:52 ` Junio C Hamano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox