fetch: fix negotiate-only error message
PATCH 1/1 fetch: fix negotiate-only error message
The error message when invoking a negotiate-only fetch without providing any tips incorrectly refers to a --negotiate-tip=* argument. Fix this to use the actual argument, --negotiation-tip=*.
--- builtin/fetch.c | 2 +- t/t5702-protocol-v2.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
builtin/fetch.c +1 -1
@@ -2029,7 +2029,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) }if (negotiate_only && !negotiation_tip.nr) -die (_ ("--negotiate-only needs one or more --negotiate-tip=*" )); +die (_ ("--negotiate-only needs one or more --negotiation-tip=*" ));if (deepen_relative) {if (deepen_relative <0 )
t/t5702-protocol-v2.sh +1 -1
@@ -619,7 +619,7 @@ test_expect_success 'usage: --negotiate-only without --negotiation-tip' ' setup_negotiate_only "$SERVER" "$URI" && cat >err.expect <<-\EOF && - fatal: --negotiate-only needs one or more --negotiate-tip=* + fatal: --negotiate-only needs one or more --negotiation-tip=* EOF test_must_fail git -c protocol.version=2 -C client fetch \
Signature · 1 line
2.34.0
Quoted 3 lines · Robert Coup
The error message when invoking a negotiate-only fetch without providing any tips incorrectly refers to a --negotiate-tip=* argument. Fix this to use the actual argument, --negotiation-tip=*.
Ah, the argument is indeed --negotiation-tip. Thanks for the fix.
Quoted 15 lines · Le vendredi 28 janvier 2022, 15:36:02 CET Robert Coup a écrit :
The error message when invoking a negotiate-only fetch without providing any tips incorrectly refers to a --negotiate-tip=* argument. Fix this to use the actual argument, --negotiation-tip=*.
Signed-off-by Robert Coup <[email protected]>--- builtin/fetch.c | 2 +- t/t5702-protocol-v2.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)builtin/fetch.c +0
-0
builtin/fetch.c int cmd_fetch(int argc, const char **argv, const char *prefix) · line 2033
Quoted 6 lines
builtin/fetch.c +1
-1@@ -2029,7 +2029,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) }if (negotiate_only && !negotiation_tip.nr) -die (_ ("--negotiate-only needs one or more --negotiate-tip=*" )); +die (_ ("--negotiate-only needs one or more --negotiation-tip=*" ));
Couldn't this message be changed to
die(_("the option '%s' requires '%s'"), "--negotiate-only", "--negotiate-tip")
Quoted 16 lines
builtin/fetch.c +0
-0if (deepen_relative) {if (deepen_relative <0 )t/t5702-protocol-v2.sh +1
-1@@ -619,7 +619,7 @@ test_expect_success 'usage: --negotiate-only without --negotiation-tip' ' setup_negotiate_only "$SERVER" "$URI" && cat >err.expect <<-\EOF && - fatal: --negotiate-only needs one or more --negotiate-tip=* + fatal: --negotiate-only needs one or more --negotiation-tip=* EOF test_must_fail git -c protocol.version=2 -C client fetch \