]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fetch: fix negotiate-only error message
authorRobert Coup <robert@coup.net.nz>
Fri, 28 Jan 2022 14:36:02 +0000 (14:36 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Jan 2022 23:02:04 +0000 (15:02 -0800)
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>
builtin/fetch.c
t/t5702-protocol-v2.sh

index 3f3fa0859fa7ccca9c782375b6f4d1fdf3790471..c480db32ce31e27a773daa3fb4e965cb36e9172d 100644 (file)
@@ -1991,7 +1991,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)
index 78de1ff2ad5900ddc81c4096b10bce0ad3e48e13..66a16d4ab715108b5d16f093514186b32e07eb97 100755 (executable)
@@ -606,7 +606,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 \