Re: [PATCH v4] attr.c: respect core.ignorecase when matching attribute patterns
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 11, 2011, 16:54 UTC
- Message-ID
- <7v8vorh3kg.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <HBn1XX5GLcGG9WPqS0RC9Uscll_6Kbd741mHOR7uc_IFxdOpGSDGF7qEBPF66SbtO3keG4GcnkbtEvKDQ5D3bCDNiV9EPgEh-CMLKgbfFJcpVD5Gcb69-QoqTpHG_J9pDQG844LtNZU@cipher.nrlssc.navy.mil>
Brandon Casey <casey@nrlssc.navy.mil> writes:
Show 6 quoted lines
> ... Currently, git builds the attr stack > based on the path supplied by the user, so we don't have to do anything > special (like use strcmp_icase) to handle the parts of that path that don't > match the filesystem with respect to case. If git instead built the attr > stack by scanning the repository, then the paths in the origin field would > not necessarily match the paths supplied by the user.
I find this description somewhat misleading. "check-attr" at the plumbing level does take full path from the end user, but a common thing Git does is to ask the system to learn the prefix to the current directory with getcwd(3) append what fill_directory() enumerates as matching a pathspec given by the user with readdir(3) to the prefix to form the full path, and then feed that full path to git_check_attr().
Without anybody changing anything, we already do build the attr stack by "scanning the repository" in that case, no?