]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fetch: fix erroneous set_head advice message
authorBence Ferdinandy <bence@ferdinandy.com>
Sun, 5 Jan 2025 16:09:40 +0000 (17:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jan 2025 14:50:03 +0000 (06:50 -0800)
9e2b7005be (fetch set_head: add warn-if-not-$branch option, 2024-12-05)
tried to expand the advice message for set_head with the new option, but
unfortunately did not manage to add the right incantation. Fix the
advice message with the correct usage of warn-if-not-$branch.

Reported-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c

index c4257a7ead740d3adb703bd4b02b6162e922d764..ba464d5521dc95032ed897cbab4c18b522589711 100644 (file)
@@ -1585,8 +1585,8 @@ static void set_head_advice_msg(const char *remote, const char *head_name)
        N_("Run 'git remote set-head %s %s' to follow the change, or set\n"
           "'remote.%s.followRemoteHEAD' configuration option to a different value\n"
           "if you do not want to see this message. Specifically running\n"
-          "'git config set remote.%s.followRemoteHEAD %s' will disable the warning\n"
-          "until the remote changes HEAD to something else.");
+          "'git config set remote.%s.followRemoteHEAD warn-if-not-branch-%s'\n"
+          "will disable the warning until the remote changes HEAD to something else.");
 
        advise_if_enabled(ADVICE_FETCH_SET_HEAD_WARN, _(message_advice_set_head),
                        remote, head_name, remote, remote, head_name);