perf: add test showing exponential growth in path globbing
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 11 May 2017 09:41:08 +0000 (09:41 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 May 2017 01:07:43 +0000 (10:07 +0900)
commit62ca75a6b9cb2e51b4eed7c551f13975b440a86c
treeb038ad00b84cb3aeb91f5ebb914d1ec8cbfabb24
parent91de27c54a6ede76b3859bc89f4c387705025f6e
perf: add test showing exponential growth in path globbing

Add a test showing that runtimes of the wildmatch() function used for
globbing in git grow exponentially in the face of some pathological
globs.

This issue affects both globs matching filenames via e.g. ls-files,
and globs matching refnames via e.g. for-each-ref.

As noted in the test description this is a test to see whether Git
suffers from the issue noted in an article Russ Cox posted today about
common bugs in various glob implementations:
https://research.swtch.com/glob

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/perf/p0100-globbing.sh [new file with mode: 0755]