Re: Lack of system-level excludesFile
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 3, 2024, 21:55 UTC
- Message-ID
- <xmqqh69shmwe.fsf@gitster.g>
- In-Reply-To
- <20241003212451.GA12763@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> PS If you want to get really wild, consider this: the exclude/ignore > feature is really just a proper subset of the attributes system that > came later. If we were designing today, we could ditch .gitignore > entirely in favor of a special "ignored" attribute,
Yes, this was brought up in the past a few times.
Both the exclude stack (in dir.c) and attr stack (in attr.c) use a similar approach to optimize the accesses to the data for callers that traverse the paths in-order and ask if something is ignored (or has this attribute) for each of the paths they encounter, so their performance characteristics might be similar. It certainly is a tempting thought and indeed is a big project, especially if you want to keep some sort of backward compatibility ;-)