summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Torek <chris.torek@gmail.com>2020-06-09 19:00:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-06-09 22:13:56 (GMT)
commitbafa2d741e9dcc4d70ffcb3943e530635bb8e684 (patch)
tree74ed5f049526504fb2479c7504f4951c44ae11ff
parentaf6b65d45ef179ed52087e80cb089f6b2349f4ec (diff)
downloadgit-bafa2d741e9dcc4d70ffcb3943e530635bb8e684.zip
git-bafa2d741e9dcc4d70ffcb3943e530635bb8e684.tar.gz
git-bafa2d741e9dcc4d70ffcb3943e530635bb8e684.tar.bz2
t/t3430: avoid undefined git diff behavior
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>
-rwxr-xr-xt/t3430-rebase-merges.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh
index a1bc3e2..b454f40 100755
--- a/t/t3430-rebase-merges.sh
+++ b/t/t3430-rebase-merges.sh
@@ -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 &&