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>
Lukas Fleischer cgit@cryptocrack.de
Mon, 26 Aug 2013 20:38:31 +0200
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
tests/t0108-patch.sh
→
tests/t0108-patch.sh
@@ -24,7 +24,7 @@ tail -1 tmp | grep "^cgit"
' 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' '