Re: [PATCH v2 2/2] dir: find common prefix among non-exclude pathspec items
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 3, 2026, 18:11 UTC
- Message-ID
- <xmqq4ig6cihc.fsf@gitster.g>
- In-Reply-To
- <27FF785F-F5D5-44EC-93C2-5BD67BD99147@ytausch.de>
Yannik Tausch <dev@ytausch.de> writes:
Show 8 quoted lines
> +void test_dir__common_prefix_skips_excluded_pathspec_items(void)
> +{
> + struct pathspec_item items[] = {
> + {
> + .match = "unrelated/path",
> + .magic = PATHSPEC_EXCLUDE,
> + .nowildcard_len = 14,
> + },This unfortunately triggers
t/unit-tests/u-dir.c: In function 'test_dir__common_prefix_skips_excluded_pathspec_items':
t/unit-tests/u-dir.c:53:34: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
53 | .match = "unrelated/path",
| ^~~~~~~~~~~~~~~~Other than that, looking good.