mirror of
https://git.zx2c4.com/cgit
synced 2024-11-08 17:48:41 +00:00
t0108: Avoid unnecessary fork()
Use `git rev-list --max-parents=0 HEAD` instead of `git rev-list HEAD | tail -1` to get the root commit. This works since Git 1.7.4.2. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
This commit is contained in:
parent
d62e71a024
commit
370535fc70
@ -24,7 +24,7 @@ test_expect_success 'find `cgit` signature' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'find initial commit' '
|
test_expect_success 'find initial commit' '
|
||||||
root=$(git --git-dir="$PWD/repos/foo/.git" rev-list HEAD | tail -1)
|
root=$(git --git-dir="$PWD/repos/foo/.git" rev-list --max-parents=0 HEAD)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'generate patch for initial commit' '
|
test_expect_success 'generate patch for initial commit' '
|
||||||
|
Loading…
Reference in New Issue
Block a user