]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5410: use longer path for sample script
authorJeff King <peff@peff.net>
Wed, 24 Oct 2018 07:37:06 +0000 (03:37 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 25 Oct 2018 02:44:34 +0000 (11:44 +0900)
t5410 creates a sample script "alternate-refs", and sets
core.alternateRefsCommand to just "alternate-refs". That
shouldn't work, as "." is not in our $PATH, and so we should
not find it.

However, due to a bug in run-command.c, we sometimes find it
anyway! Even more confusing, this bug is only in the
fork-based version of run-command. So the test passes on
Linux (etc), but fails on Windows.

In preparation for fixing the run-command bug, let's use a
more complete path here.

Reported-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5410-receive-pack-alternates.sh

index 457c20c2a579d48a36a20a4742de4f7cab235f26..f00d0da8606dbc26d6d45c987a763798d2187e31 100755 (executable)
@@ -23,7 +23,7 @@ test_expect_success 'with core.alternateRefsCommand' '
                        --format="%(objectname)" \
                        refs/heads/public/
        EOF
-       test_config -C fork core.alternateRefsCommand alternate-refs &&
+       test_config -C fork core.alternateRefsCommand ./alternate-refs &&
        git rev-parse public/branch >expect &&
        printf "0000" | git receive-pack fork >actual &&
        extract_haves <actual >actual.haves &&