Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
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.
Diffstat (limited to 'tests/t0106-commit.sh')
-rwxr-xr-xtests/t0106-commit.sh2
1 file changed, 1 insertion, 1 deletion
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 "</html>" tmp
'