Re: [PATCH v2 15/18] test-reach: test commit_contains

2018-07-25 Thread Derrick Stolee
On 7/25/2018 2:08 PM, Junio C Hamano wrote: Jonathan Tan writes: + } else if (!strcmp(av[1], "commit_contains")) { + struct ref_filter filter; + struct contains_cache cache; + init_contains_cache(); + + if (ac > 2 && !strcmp(av[2],

Re: [PATCH v2 15/18] test-reach: test commit_contains

2018-07-25 Thread Junio C Hamano
Jonathan Tan writes: >> +} else if (!strcmp(av[1], "commit_contains")) { >> +struct ref_filter filter; >> +struct contains_cache cache; >> +init_contains_cache(); >> + >> +if (ac > 2 && !strcmp(av[2], "--tag")) >> +

Re: [PATCH v2 15/18] test-reach: test commit_contains

2018-07-23 Thread Jonathan Tan
> + } else if (!strcmp(av[1], "commit_contains")) { > + struct ref_filter filter; > + struct contains_cache cache; > + init_contains_cache(); > + > + if (ac > 2 && !strcmp(av[2], "--tag")) > + filter.with_commit_tag_algo = 1;

[PATCH v2 15/18] test-reach: test commit_contains

2018-07-20 Thread Derrick Stolee
The commit_contains method has two modes which depend on the given ref_filter struct. We have the "normal" algorithm (which is also the typically-slow operation) and the "tag" algorithm. This difference is essentially what changes performance for 'git branch --contains' versus 'git tag