[PATCH] [TOPGIT] limit rev-list in branch_contains to a single rev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This eases reading of debug output using sh -x and probably helps
performance, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 tg.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tg.sh b/tg.sh
index 8c23d26..ccb40cd 100644
--- 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
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux