From 92b4d7933252c03a995730e7d0164951254a7572 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:57:37 -0700 Subject: Write the diff and patch checks as the suite does git -C, test_cmp with expect and actual, and rev-list --max-parents=0 for the root commit, the forms the other files use. --- tests/t0106-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/t0106-commit.sh') diff --git a/tests/t0106-commit.sh b/tests/t0106-commit.sh index d420585..9a0a7e1 100755 --- a/tests/t0106-commit.sh +++ b/tests/t0106-commit.sh @@ -39,7 +39,7 @@ test_expect_success 'a commit that changes no files draws no diffstat table' ' # A root commit has no parent, so it diffs against the empty tree. test_expect_success 'get root commit' ' - root=$(cd repos/foo && git rev-list --reverse HEAD | head -1) && + root=$(git -C repos/foo rev-list --max-parents=0 HEAD) && cgit_url "foo/commit&id=$root" >tmp && grep "" tmp ' -- cgit