git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Teach ignore machinery about pattern "/"

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jun 3, 2012, 12:36 UTC
Message-ID
<CACsJy8BSHFzGfsm6qY1LEX9wubKjKXXbJ_WMAiOAUhVGa631Ag@mail.gmail.com>
In-Reply-To
<CACsJy8BjUQsCVVdzZtJxA9Qu2G0izZa8dvP1EKsQQAHWXZbHdg@mail.gmail.com>

On Sat, May 26, 2012 at 11:30 AM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:

Show 12 quoted lines
> On Sat, May 26, 2012 at 12:32 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “Teach ignore machinery about pattern "/"”
  1. Teach ignore machinery about pattern "/"Nguyễn Thái Ngọc Duy, May 25, 2012
  2. Junio C HamanoMay 25, 2012
  3. Nguyen Thai Ngoc DuyMay 26, 2012
  4. Junio C HamanoMay 27, 2012
  5. Nguyen Thai Ngoc DuyJun 3, 2012
  6. Junio C HamanoJun 3, 2012
  7. Caleb MarchentJun 3, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.