Re: How do I qualify paths in the .gitignore file w.r.t. the repo root directory?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 26, 2009, 17:04 UTC
- Message-ID
- <7v1vtluo2e.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <slrngqc47n.t1k.sitaramc@sitaramc.homelinux.net>
Sitaram Chamarty <sitaramc@gmail.com> writes:
Show 16 quoted lines
> How about this: > > ----8<---- > > - an optional leading ! symbol meaning "unignore paths > that match this pattern, instead of ignoring them" > > - an optional trailing / symbol meaning "this pattern > matches only with a directory (i.e., files and > symlinks won't match)" > > - the above two symbols (if present) are then removed. > What remains is treated as a normal shell glob > pattern, with the additional restriction that if the > pattern still contains a slash, it matches only at the > current directory and not in its subdirectories
Sure, but then you are not stripping the leading / from the pattern but you do not use it for the purpose of matching, right?
I think your original before I wondered about the ambiguity is the best rewrite so far.