Skip to content

Commit

Permalink
t/t3430: avoid undefined git diff behavior
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chris3torek authored and gitster committed Jun 9, 2020
1 parent af6b65d commit bafa2d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t3430-rebase-merges.sh
Expand Up @@ -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 &&
Expand Down

0 comments on commit bafa2d7

Please sign in to comment.