]> git.99rst.org Git - git.git/commit
remote: allow `guess_remote_head()` to suppress advice
authorJustin Tobler <redacted>
Tue, 25 Mar 2025 00:51:46 +0000 (19:51 -0500)
committerJunio C Hamano <redacted>
Tue, 25 Mar 2025 23:09:27 +0000 (16:09 -0700)
commitd5d284df910b5f03681b480ae061bb1435b3b4b2
tree44349ee09df44c6039fd7afeedadada8b8f6d316
parent683c54c999c301c2cd6f715c411407c413b1d84e
remote: allow `guess_remote_head()` to suppress advice

The `repo_default_branch_name()` invoked through `guess_remote_head()`
is configured to always display the default branch advice message.

Adapt `guess_remote_head()` to accept flags and convert the `all`
parameter to a flag. Add the `REMOTE_GUESS_HEAD_QUIET` flag to to enable
suppression of advice messages. Call sites are updated accordingly.

Signed-off-by: Justin Tobler <redacted>
Acked-by: Phillip Wood <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/fetch.c
builtin/remote.c
remote.c
remote.h
git clone https://git.99rst.org/PROJECT