chiark / gitweb /
[TOPGIT] limit rev-list in branch_contains to a single rev
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 25 Feb 2009 10:05:00 +0000 (11:05 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 25 Feb 2009 19:49:24 +0000 (20:49 +0100)
This eases reading of debug output using sh -x and probably helps
performance, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
tg.sh

diff --git a/tg.sh b/tg.sh
index 8c23d26..ccb40cd 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -77,7 +77,7 @@ measure_branch()
 # Whether B1 is a superset of B2.
 branch_contains()
 {
-       [ -z "$(git rev-list ^"$1" "$2" --)" ]
+       [ -z "$(git rev-list --max-count=1 ^"$1" "$2" --)" ]
 }
 
 # ref_exists REF