Skip to content

Commit 233d48f

Browse files
ferdinandybgitster
authored andcommitted
fetch: fix erroneous set_head advice message
9e2b700 (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 <[email protected]> Signed-off-by: Bence Ferdinandy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 012bc56 commit 233d48f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/fetch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,8 +1585,8 @@ static void set_head_advice_msg(const char *remote, const char *head_name)
15851585
N_("Run 'git remote set-head %s %s' to follow the change, or set\n"
15861586
"'remote.%s.followRemoteHEAD' configuration option to a different value\n"
15871587
"if you do not want to see this message. Specifically running\n"
1588-
"'git config set remote.%s.followRemoteHEAD %s' will disable the warning\n"
1589-
"until the remote changes HEAD to something else.");
1588+
"'git config set remote.%s.followRemoteHEAD warn-if-not-branch-%s'\n"
1589+
"will disable the warning until the remote changes HEAD to something else.");
15901590

15911591
advise_if_enabled(ADVICE_FETCH_SET_HEAD_WARN, _(message_advice_set_head),
15921592
remote, head_name, remote, remote, head_name);

0 commit comments

Comments
 (0)