[PATCH v3 1/3] t/t3430: avoid undefined git diff behavior
- From
Chris Torek via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jun 11, 2020, 15:15 UTC
- Message-ID
- <2ccaad645ff01b786e76dc63210d75da633389a6.1591888511.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.804.v3.git.git.1591888511.gitgitgadget@gmail.com>
From: Chris Torek <chris.torek@gmail.com>
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> --- t/t3430-rebase-merges.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t3430-rebase-merges.sh b/t/t3430-rebase-merges.sh index a1bc3e20016..b454f400ebd 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 &&
-- gitgitgadget