summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-09 18:25:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-11 20:31:19 (GMT)
commit11f470aee7ccd43bc2be159e69e121c35a72f91d (patch)
tree076e1ca43d4b14a12ee085ffe69817180814d557 /t/test-lib.sh
parent11ad41d4cb25a41b21a7343c495aceb38d4db4d8 (diff)
downloadgit-11f470aee7ccd43bc2be159e69e121c35a72f91d.zip
git-11f470aee7ccd43bc2be159e69e121c35a72f91d.tar.gz
git-11f470aee7ccd43bc2be159e69e121c35a72f91d.tar.bz2
test: caution on our version of 'yes'
During a review of a patch, we noticed that we use our own imitation of 'yes' with the limit of 99 lines. It is very tempting to lift this arbitrary limit, but the limit is there for a reason. Add an in-code comment to prevent future developers from wasting their time. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 42b1a0a..541a37f 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1313,7 +1313,11 @@ then
fi
fi
-# Provide an implementation of the 'yes' utility
+# Provide an implementation of the 'yes' utility; the upper bound
+# limit is there to help Windows that cannot stop this loop from
+# wasting cycles when the downstream stops reading, so do not be
+# tempted to turn it into an infinite loop. cf. 6129c930 ("test-lib:
+# limit the output of the yes utility", 2016-02-02)
yes () {
if test $# = 0
then