From: Junio C Hamano Date: Thu, 26 Feb 2009 17:04:41 GMT Subject: Re: How do I qualify paths in the .gitignore file w.r.t. the repo root directory? Message-ID: <7v1vtluo2e.fsf@gitster.siamese.dyndns.org> In-Reply-To: Sitaram Chamarty writes: > 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.