{"thread":{"id":"57332","subject":"[PATCH] fetch: fix negotiate-only error message","startedAt":"2022-01-28T14:36:18Z","lastAt":"2022-02-05T12:30:07Z","messageCount":3,"participants":["Robert Coup","Jonathan Tan","Jean-Noël AVILA"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"447216","messageId":"20220128143602.31842-1-robert@coup.net.nz","threadId":"57332","inReplyTo":null,"subject":"[PATCH] fetch: fix negotiate-only error message","fromName":"Robert Coup","fromEmail":"robert@coup.net.nz","sentAt":"2022-01-28T14:36:02Z","receivedAt":"2022-01-28T14:36:18Z","isPatch":true,"sender":{"key":"robert@coup.net.nz","avatar":"https://avatars.githubusercontent.com/u/59874?v=4"},"body":"The error message when invoking a negotiate-only fetch without providing\nany tips incorrectly refers to a --negotiate-tip=* argument. Fix this to\nuse the actual argument, --negotiation-tip=*.\n\nSigned-off-by: Robert Coup <robert@coup.net.nz>\n---\n builtin/fetch.c        | 2 +-\n t/t5702-protocol-v2.sh | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/fetch.c b/builtin/fetch.c\nindex 5f06b21f8e..af689a72a8 100644\n--- a/builtin/fetch.c\n+++ b/builtin/fetch.c\n@@ -2029,7 +2029,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)\n \t}\n \n \tif (negotiate_only && !negotiation_tip.nr)\n-\t\tdie(_(\"--negotiate-only needs one or more --negotiate-tip=*\"));\n+\t\tdie(_(\"--negotiate-only needs one or more --negotiation-tip=*\"));\n \n \tif (deepen_relative) {\n \t\tif (deepen_relative < 0)\ndiff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh\nindex 710f33e2aa..59a49cede7 100755\n--- a/t/t5702-protocol-v2.sh\n+++ b/t/t5702-protocol-v2.sh\n@@ -619,7 +619,7 @@ test_expect_success 'usage: --negotiate-only without --negotiation-tip' '\n \tsetup_negotiate_only \"$SERVER\" \"$URI\" &&\n \n \tcat >err.expect <<-\\EOF &&\n-\tfatal: --negotiate-only needs one or more --negotiate-tip=*\n+\tfatal: --negotiate-only needs one or more --negotiation-tip=*\n \tEOF\n \n \ttest_must_fail git -c protocol.version=2 -C client fetch \\\n-- \n2.34.0\n\n"},{"id":"447226","messageId":"20220128174236.3264310-1-jonathantanmy@google.com","threadId":"57332","inReplyTo":"20220128143602.31842-1-robert@coup.net.nz","subject":"Re: [PATCH] fetch: fix negotiate-only error message","fromName":"Jonathan Tan","fromEmail":"jonathantanmy@google.com","sentAt":"2022-01-28T17:42:36Z","receivedAt":"2022-01-28T17:42:59Z","isPatch":true,"sender":{"key":"jonathantanmy@fastmail.com","avatar":null},"body":"Robert Coup <robert@coup.net.nz> writes:\n> The error message when invoking a negotiate-only fetch without providing\n> any tips incorrectly refers to a --negotiate-tip=* argument. Fix this to\n> use the actual argument, --negotiation-tip=*.\n\nAh, the argument is indeed --negotiation-tip. Thanks for the fix.\nReviewed-by: Jonathan Tan <jonathantanmy@google.com>\n"},{"id":"447824","messageId":"3251849.E01RNdcrvH@cayenne","threadId":"57332","inReplyTo":"20220128143602.31842-1-robert@coup.net.nz","subject":"Re: [PATCH] fetch: fix negotiate-only error message","fromName":"Jean-Noël AVILA","fromEmail":"jn.avila@free.fr","sentAt":"2022-02-05T12:29:59Z","receivedAt":"2022-02-05T12:30:07Z","isPatch":true,"sender":{"key":"jn.avila@free.fr","avatar":"https://avatars.githubusercontent.com/u/156172?v=4"},"body":"Le vendredi 28 janvier 2022, 15:36:02 CET Robert Coup a écrit :\n> The error message when invoking a negotiate-only fetch without providing\n> any tips incorrectly refers to a --negotiate-tip=* argument. Fix this to\n> use the actual argument, --negotiation-tip=*.\n> \n> Signed-off-by: Robert Coup <robert@coup.net.nz>\n> ---\n>  builtin/fetch.c        | 2 +-\n>  t/t5702-protocol-v2.sh | 2 +-\n>  2 files changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/builtin/fetch.c b/builtin/fetch.c\n> index 5f06b21f8e..af689a72a8 100644\n> --- a/builtin/fetch.c\n> +++ b/builtin/fetch.c\n> @@ -2029,7 +2029,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)\n>  \t}\n>  \n>  \tif (negotiate_only && !negotiation_tip.nr)\n> -\t\tdie(_(\"--negotiate-only needs one or more --negotiate-tip=*\"));\n> +\t\tdie(_(\"--negotiate-only needs one or more --negotiation-tip=*\"));\n>  \n\nCouldn't this message be changed to\n\ndie(_(\"the option '%s' requires '%s'\"), \"--negotiate-only\", \"--negotiate-tip\")\n\n\n\n>  \tif (deepen_relative) {\n>  \t\tif (deepen_relative < 0)\n> diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh\n> index 710f33e2aa..59a49cede7 100755\n> --- a/t/t5702-protocol-v2.sh\n> +++ b/t/t5702-protocol-v2.sh\n> @@ -619,7 +619,7 @@ test_expect_success 'usage: --negotiate-only without --negotiation-tip' '\n>  \tsetup_negotiate_only \"$SERVER\" \"$URI\" &&\n>  \n>  \tcat >err.expect <<-\\EOF &&\n> -\tfatal: --negotiate-only needs one or more --negotiate-tip=*\n> +\tfatal: --negotiate-only needs one or more --negotiation-tip=*\n>  \tEOF\n>  \n>  \ttest_must_fail git -c protocol.version=2 -C client fetch \\\n> \n\n\n\n\n"}]}