From: Nguyen Thai Ngoc Duy Date: Sun, 03 Jun 2012 12:36:23 GMT Subject: Re: [PATCH] Teach ignore machinery about pattern "/" Message-ID: In-Reply-To: On Sat, May 26, 2012 at 11:30 AM, Nguyen Thai Ngoc Duy wrote: > On Sat, May 26, 2012 at 12:32 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy   writes: >> >>> Pattern "/" is ambiguous because the slash can mean "anchor the >>> pattern to this location" (e.g. /path), but it can also mean >>> "match directories only" (e.g. path/). Currently git interprets it as >>> the latter except that 'path' is an empty string, which makes this >>> pattern totally useless. >> >> Did the old version interprete it as the former? > > That calls for bit of testing, which I'll do soon. "/" is no-op since 1.4.0 (tested with refs/tags/v*), tested with "git add ." with $GIT_DIR/info/exclude containing only "/". "git add" in pre-1.4 is shell script and needs to be installed to work properly so I only tested v1.3.0 and v1.0.0, and it worked too (i.e. "/" is still no-op). I think it's safe to make it a meaningful pattern (or warn about its uselessness). -- Duy