In b7cc53e92c806b73e14b03f60c17b7c29e52b4a4 we port tag.c to use ref-filter APIs for filtering and printing refs. But that commit missed out on setting 'filter->with_commit_tag_algo' which would ensure the correct algorithm is used for the '--contains' option. As reported by Jerry Snitselaar, this causes the option to work way slower than expected, fix this by setting 'filter->with_commit_tag_algo' in tag.c before calling 'filter_refs()'. Mentored-by: Christian Couder <christian.couder@xxxxxxxxx> Mentored-by: Matthieu Moy <matthieu.moy@xxxxxxxxxxxxxxx> Signed-off-by: Karthik Nayak <karthik.188@xxxxxxxxx> Tested-by: Jerry Snitselaar <jsnitsel@xxxxxxxxxx> --- builtin/tag.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/tag.c b/builtin/tag.c index 977a18c..2c5a9f1 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -49,6 +49,7 @@ static int list_tags(struct ref_filter *filter, struct ref_sorting *sorting) format = "%(refname:short)"; verify_ref_format(format); + filter->with_commit_tag_algo = 1; filter_refs(&array, filter, FILTER_REFS_TAGS); ref_array_sort(sorting, &array); -- 2.6.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html