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

Re: $GIT_DIR/info/exclude fails to negate a pattern defined by core.excludesfile

From
Dun Peal <dunpealer@gmail.com>
Date
Oct 12, 2014, 14:48 UTC
Message-ID
<CAD03jn5_LY4gr68bCO1axXiGxCwX9xZeywD9uGoZdsXqzynBWQ@mail.gmail.com>
In-Reply-To
<CAD03jn4md9YJZ3fFWmvjiO2KSztc-02QpznXO3LJeiZDz8YhrQ@mail.gmail.com>

I used `check-ignore -v`, and the `.out` file is being ignored by the `*.out` pattern in the `core.excludesfile` file. Its parent folder is not being ignored. So as a rule, `core.excludesfile` overrides `$GIT_DIR/info/exclude`.

That doesn't make much sense to me, because I'm much more likely to want to override global exclusions for a specific project, than override specific project settings with a global exclusion file (that last one really makes no sense imho).

Thoughts?
On Sat, Oct 11, 2014 at 10:58 PM, Dun Peal <dunpealer@gmail.com> wrote:
Show 13 quoted lines
> I have the pattern `*.out` defined in my `core.excludesfile`.
> According to the documentation[1], patterns defined in
> `$GIT_DIR/info/exclude` take precedence over `core.excludesfile`, so
> for one particular project that needs to track some `.out` files, I
> created `$GIT_DIR/info/exclude` with just one pattern: `!*.out`.
>
> Yet for some reason, `git status` still fails to report newly created
> `.out` files for that project. Am I misunderstanding the
> documentation?
>
> Thanks, D.
>
> [1] http://jk.gs/gitignore.html
Previous: Dun PealNext: Duy Nguyen
Message 2 of 4 in “$GIT_DIR/info/exclude fails to negate a pattern defined by core.excludesfile”
  1. Dun PealOct 12, 2014
  2. Dun PealOct 12, 2014
  3. Duy NguyenOct 12, 2014
  4. Dun PealOct 13, 2014

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.