Message ID | 20250105161017.210412-1-bence@ferdinandy.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 233d48f5de1d6cdba0eb64165212dfbf6fa444d7 |
Headers | show |
Series | fetch: fix erroneous set_head advice message | expand |
Bence Ferdinandy <bence@ferdinandy.com> writes: > 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> > --- > builtin/fetch.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/builtin/fetch.c b/builtin/fetch.c > index 2d37a378ba..fe2b26c74a 100644 > --- a/builtin/fetch.c > +++ b/builtin/fetch.c > @@ -1588,8 +1588,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); Thanks, both. Will queue.
diff --git a/builtin/fetch.c b/builtin/fetch.c index 2d37a378ba..fe2b26c74a 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1588,8 +1588,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);
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> --- builtin/fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: 1b4e9a5f8b5f048972c21fe8acafe0404096f694