]> git.ipfire.org Git - thirdparty/git.git/commit
promisor-remote: fix promisor.quiet to use the correct repository
authorTrieu Huynh <vikingtc4@gmail.com>
Mon, 6 Apr 2026 18:30:41 +0000 (03:30 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Apr 2026 19:06:29 +0000 (12:06 -0700)
commitfa1468a1f7c7765a6c7dd1faca4c9dc241d0538c
tree20702e0e30be276fc634035e88957f51dab34cb8
parent2f8c3f6a5a6d6a3de205be709e1a598b9d4b0b3e
promisor-remote: fix promisor.quiet to use the correct repository

fetch_objects() reads the promisor.quiet configuration from
the_repository instead of the repo parameter it receives.

This means that when git lazy-fetches objects for a non-main
repository, eg. a submodule that is itself a partial clone opened
via repo_submodule_init(). The submodule's own promisor.quiet
setting is ignored and the superproject's setting is used instead.

Fix by replacing the_repository with repo in the repo_config_get_bool()
call. The practical trigger is git grep --recurse-submodules on a
superproject where the submodule is a partial clone.

Add a test where promisor.quiet is set only in a partial-clone
submodule; a lazy fetch triggered by "git grep --recurse-submodules"
must honor that setting.

Signed-off-by: Trieu Huynh <vikingtc4@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
promisor-remote.c
t/t0410-partial-clone.sh