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],
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"))
>> +
> + } 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;
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
4 matches
Mail list logo