From: Junio C Hamano <gitster@pobox.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git-add ignores exclude markers for ignored files
Date: Tue, 04 Nov 2025 16:54:00 -0800 [thread overview]
Message-ID: <xmqq4ir9nvtj.fsf@gitster.g> (raw)
In-Reply-To: <xmqqtsz9o3cn.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 04 Nov 2025 14:11:20 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> This may be an ancient regression when e1b8c7bd (dir: remove struct
> path_simplify, 2017-01-04) was rewritten exclude_matches_pathspec()
> function, which was written in 29209cbe (dir: fix COLLECT_IGNORED on
> excluded prefixes, 2010-03-11), back in the days before ":(exclude)"
> and other pathspec magic was even invented.
>
> Perhaps try this patch?
>
> I have no idea what the ramifications of the change is, though.
> There may be unintended fallouts in some distant corner, even though
> it does not seem to break any existing tests.
One thing that I am extremely uncomfortable about this change is
that I do not quite see why we use this function to begin with.
Given a <path, pathlen>, it seems if the pathspec matches, but why
aren't we using dir.c:match_pathspec() for and have our own separate
and much simple-minded variant instead?
next prev parent reply other threads:[~2025-11-05 0:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 15:59 git-add ignores exclude markers for ignored files Rahn, René
2025-11-04 22:11 ` Junio C Hamano
2025-11-05 0:54 ` Junio C Hamano [this message]
2026-01-20 20:46 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq4ir9nvtj.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.