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=*. Signed-off-by: Robert Coup <robert@coup.net.nz> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Robert Coup committed
Jan 28, 2022 at 14:36 UTC
2826ffad8c34b639fd41f62fac1236e36e9d83db
2 files changed
+2
-2
builtin/fetch.c
+1
-1
@@ -1991,7 +1991,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
1991
}
1992
1993
if (negotiate_only && !negotiation_tip.nr)
1994
- die(_("--negotiate-only needs one or more --negotiate-tip=*"));
1994
+ die(_("--negotiate-only needs one or more --negotiation-tip=*"));
1995
1996
if (deepen_relative) {
1997
if (deepen_relative < 0)
t/t5702-protocol-v2.sh
+1
-1
@@ -606,7 +606,7 @@ test_expect_success 'usage: --negotiate-only without --negotiation-tip' '
606
setup_negotiate_only "$SERVER" "$URI" &&
607
608
cat >err.expect <<-\EOF &&
609
- fatal: --negotiate-only needs one or more --negotiate-tip=*
609
+ fatal: --negotiate-only needs one or more --negotiation-tip=*
610
EOF
611
612
test_must_fail git -c protocol.version=2 -C client fetch \