about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLukas Fleischer <cgit@cryptocrack.de>2013-08-26 20:38:31 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2013-08-26 21:01:11 +0200
commit370535fc70e87e465e0d6b39420b0b6a72056b37 (patch)
tree9d39703b4052bf9521dcf6e4335830899d5411ea /tests
parentgit: update to 1.8.4 (diff)
downloadcgit-pink-370535fc70e87e465e0d6b39420b0b6a72056b37.tar.gz
cgit-pink-370535fc70e87e465e0d6b39420b0b6a72056b37.zip
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')
-rwxr-xr-xtests/t0108-patch.sh2
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' '
 '
 
 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' '
='2021-01-15 21:38:06 +0000'>2021-01-15Update catgirl to 1.4June McEnroe 2020-12-28Replace cgit-patched with cgit-causal-agencyJune McEnroe 2020-12-18Add notemap portJune McEnroe 2020-12-15Update libretls to 3.3.1June McEnroe 2020-12-15Update catsit to 1.1June McEnroe 2020-12-15Update pounce to 2.1p1June McEnroe 2020-12-15Add imbox portJune McEnroe 2020-11-24Update pounce to 2.1June McEnroe 2020-11-24Update libretls to 3.3.0June McEnroe 2020-11-17Update catgirl to 1.3June McEnroe 2020-11-17Update libretls to 3.2.2June McEnroe 2020-09-29Update libretls to 3.2.1June McEnroe 2020-09-10Update catgirl to 1.2June McEnroe 2020-09-09Add pounce-palaver portJune McEnroe 2020-09-09Update pounce to 2.0June McEnroe 2020-09-09Update litterbox to 1.6June McEnroe 2020-08-23Add scooper portJune McEnroe 2020-08-23Add catsit portJune McEnroe 2020-08-13Update pounce to 1.4p2June McEnroe 2020-08-11Update pounce to 1.4p1June McEnroe 2020-08-10Add litterbox portJune McEnroe 2020-08-10Add missing USES=pkgconfig to pounceJune McEnroe