]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/t3430: avoid undefined git diff behavior
authorChris Torek <chris.torek@gmail.com>
Tue, 9 Jun 2020 19:00:21 +0000 (19:00 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Jun 2020 22:13:56 +0000 (15:13 -0700)
The autosquash-and-exec test used "git diff HEAD^!" to mean
"git diff HEAD^ HEAD".  Use these directly instead of relying
on the undefined but actual-current behavior of "HEAD^!".

Signed-off-by: Chris Torek <chris.torek@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3430-rebase-merges.sh

index a1bc3e20016b37492c4f351970a7d8f8da44d5e8..b454f400ebdc22a0c64ee20940f57966ed794709 100755 (executable)
@@ -420,7 +420,7 @@ test_expect_success 'with --autosquash and --exec' '
        git commit --fixup B B.t &&
        write_script show.sh <<-\EOF &&
        subject="$(git show -s --format=%s HEAD)"
-       content="$(git diff HEAD^! | tail -n 1)"
+       content="$(git diff HEAD^ HEAD | tail -n 1)"
        echo "$subject: $content"
        EOF
        test_tick &&