diff options
author | Lukas Fleischer <cgit@cryptocrack.de> | 2013-08-27 03:38:31 (JST) |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-08-27 04:01:11 (JST) |
commit | 370535fc70e87e465e0d6b39420b0b6a72056b37 (patch) | |
tree | 9d39703b4052bf9521dcf6e4335830899d5411ea /tests/t0108-patch.sh | |
parent | d62e71a0240a7506b870b99e5c068f336e0a137e (diff) | |
download | cgit-370535fc70e87e465e0d6b39420b0b6a72056b37.zip cgit-370535fc70e87e465e0d6b39420b0b6a72056b37.tar.gz |
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>
Diffstat (limited to 'tests/t0108-patch.sh')
-rwxr-xr-x | tests/t0108-patch.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh index 3b5bae4..867d739 100755 --- a/tests/t0108-patch.sh +++ b/tests/t0108-patch.sh | |||
@@ -24,7 +24,7 @@ test_expect_success 'find `cgit` signature' ' | |||
24 | ' | 24 | ' |
25 | 25 | ||
26 | test_expect_success 'find initial commit' ' | 26 | test_expect_success 'find initial commit' ' |
27 | root=$(git --git-dir="$PWD/repos/foo/.git" rev-list HEAD | tail -1) | 27 | root=$(git --git-dir="$PWD/repos/foo/.git" rev-list --max-parents=0 HEAD) |
28 | ' | 28 | ' |
29 | 29 | ||
30 | test_expect_success 'generate patch for initial commit' ' | 30 | test_expect_success 'generate patch for initial commit' ' |