gc.sh: optimize is_dirty test
commit36927d7f57b758064d0245f2e07b87b0b6427b38
authorKyle J. McKay <mackyle@gmail.com>
Mon, 5 Oct 2015 12:02:18 +0000 (5 05:02 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 5 Oct 2015 12:02:18 +0000 (5 05:02 -0700)
treeace357ae24f88b1e6842ef3a9ad6b6024041a6ef
parent6fb1c301c61297002c89372d42cb62329060eae5
gc.sh: optimize is_dirty test

Add a pipe through head so that find will be terminated by a
SIGPIPE early once it's found enough results to satisfy the test.

In the normal case, spawning the extra head process will be
just ever so slightly slower, but in the pathological case of
many, many, many objects and/or packs, the test will complete
much, much, much more quickly with the head process in there.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
jobd/gc.sh