On Fri, Jul 15, 2011 at 2:17 PM, Linus Torvalds
[off-list ref] wrote:
For example, for the "git tag --contains" thing, what's the
performance effect of just skipping tags that are much older than the
commit we ask for?
Hmm.
Maybe there is something seriously wrong with this trivial patch, but
it gave the right results for the test-cases I threw at it, and passes
the tests.
Before:
[torvalds@i5 linux]$ time git tag --contains v2.6.24 > correct
real 0m7.548s
user 0m7.344s
sys 0m0.116s
After:
[torvalds@i5 linux]$ time ~/git/git tag --contains v2.6.24 > date-cut-off
real 0m0.161s
user 0m0.140s
sys 0m0.016s
and 'correct' and 'date-cut-off' both give the same answer.
The date-based "slop" thing is (at least *meant* to be - note the lack
of any extensive testing) "at least five consecutive commits that have
dates that are more than five days off".
Somebody should double-check my logic. Maybe I'm doing something
stupid. Because that's a *big* difference.
Linus