Re: pathspec: match and original in pathspec_item are const
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 3, 2026, 18:51 UTC
- Message-ID
- <xmqqbjaeb22p.fsf@gitster.g>
- In-Reply-To
- <4439BA70-2C03-499D-B3CE-E43700C0A8DA@ytausch.de>
Yannik Tausch <dev@ytausch.de> writes:
Show 18 quoted lines
>> I just found [1], which is related to this patch series. I didn’t review the discussion in detail yet, will follow up. > > I read this as you came to the same conclusion as me independently discovering the same issue in July. Perfect! I hope it’s fine that I took over the fix that way. > >> Junio C Hamano <gitster@pobox.com> writes: >> >>> 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. >> >> We may want a preparatory patch before this step. > > Thanks, I will include your preparatory patch in v3.
The 'const' patch will be queued separately, and a synthetic base will be prepared for your two-patch series by merging the 'const' patch on a recent tip of master.
Unless you have other changes, there is no need for you to send a three-patch series. We do not need to take the 'const' patch hostage to the 'pathspec' patch.
Thanks.