Re: [PATCH v2 15/18] test-reach: test commit_contains
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Jul 23, 2018, 20:35 UTC
- Message-ID
- <20180723203500.231932-1-jonathantanmy@google.com>
- In-Reply-To
- <20180720163227.105950-16-dstolee@microsoft.com>
Show 11 quoted lines
> + } else if (!strcmp(av[1], "commit_contains")) {
> + struct ref_filter filter;
> + struct contains_cache cache;
> + init_contains_cache(&cache);
> +
> + if (ac > 2 && !strcmp(av[2], "--tag"))
> + filter.with_commit_tag_algo = 1;
> + else
> + filter.with_commit_tag_algo = 0;
> +
> + printf("%s(_,A,X,_):%d\n", av[1], commit_contains(&filter, A, X, &cache));Should we initialize filter (with {NULL} or some equivalent)?