{"thread":{"id":"37719","subject":"$GIT_DIR/info/exclude fails to negate a pattern defined by core.excludesfile","startedAt":"2014-10-12T02:58:19Z","lastAt":"2014-10-13T13:23:33Z","messageCount":4,"participants":["Dun Peal","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"250521","messageId":"CAD03jn4md9YJZ3fFWmvjiO2KSztc-02QpznXO3LJeiZDz8YhrQ@mail.gmail.com","threadId":"37719","inReplyTo":null,"subject":"$GIT_DIR/info/exclude fails to negate a pattern defined by core.excludesfile","fromName":"Dun Peal","fromEmail":"dunpealer@gmail.com","sentAt":"2014-10-12T02:58:19Z","receivedAt":"2014-10-12T02:58:19Z","isPatch":false,"sender":{"key":"dunpealer@gmail.com","avatar":"https://gravatar.com/avatar/42f3e6a1166eb44e33f24c20ccbe809fa8591413f366dfe3755c8a8d4935ace9?d=mp&s=160"},"body":"I have the pattern `*.out` defined in my `core.excludesfile`.\nAccording to the documentation[1], patterns defined in\n`$GIT_DIR/info/exclude` take precedence over `core.excludesfile`, so\nfor one particular project that needs to track some `.out` files, I\ncreated `$GIT_DIR/info/exclude` with just one pattern: `!*.out`.\n\nYet for some reason, `git status` still fails to report newly created\n`.out` files for that project. Am I misunderstanding the\ndocumentation?\n\nThanks, D.\n\n[1] http://jk.gs/gitignore.html\n"},{"id":"250530","messageId":"CAD03jn5_LY4gr68bCO1axXiGxCwX9xZeywD9uGoZdsXqzynBWQ@mail.gmail.com","threadId":"37719","inReplyTo":"CAD03jn4md9YJZ3fFWmvjiO2KSztc-02QpznXO3LJeiZDz8YhrQ@mail.gmail.com","subject":"Re: $GIT_DIR/info/exclude fails to negate a pattern defined by core.excludesfile","fromName":"Dun Peal","fromEmail":"dunpealer@gmail.com","sentAt":"2014-10-12T14:48:06Z","receivedAt":"2014-10-12T14:48:06Z","isPatch":false,"sender":{"key":"dunpealer@gmail.com","avatar":"https://gravatar.com/avatar/42f3e6a1166eb44e33f24c20ccbe809fa8591413f366dfe3755c8a8d4935ace9?d=mp&s=160"},"body":"I used `check-ignore -v`, and the `.out` file is being ignored by the\n`*.out` pattern in the `core.excludesfile` file. Its parent folder is\nnot being ignored. So as a rule, `core.excludesfile` overrides\n`$GIT_DIR/info/exclude`.\n\nThat doesn't make much sense to me, because I'm much more likely to\nwant to override global exclusions for a specific project, than\noverride specific project settings with a global exclusion file (that\nlast one really makes no sense imho).\n\nThoughts?\n\nOn Sat, Oct 11, 2014 at 10:58 PM, Dun Peal <dunpealer@gmail.com> wrote:\n> I have the pattern `*.out` defined in my `core.excludesfile`.\n> According to the documentation[1], patterns defined in\n> `$GIT_DIR/info/exclude` take precedence over `core.excludesfile`, so\n> for one particular project that needs to track some `.out` files, I\n> created `$GIT_DIR/info/exclude` with just one pattern: `!*.out`.\n>\n> Yet for some reason, `git status` still fails to report newly created\n> `.out` files for that project. Am I misunderstanding the\n> documentation?\n>\n> Thanks, D.\n>\n> [1] http://jk.gs/gitignore.html\n"},{"id":"250533","messageId":"CACsJy8Aj-_VhiiG9ogoABaGs69TQ+HyEnOVb75UT53W5+YcKVg@mail.gmail.com","threadId":"37719","inReplyTo":"CAD03jn4md9YJZ3fFWmvjiO2KSztc-02QpznXO3LJeiZDz8YhrQ@mail.gmail.com","subject":"Re: $GIT_DIR/info/exclude fails to negate a pattern defined by core.excludesfile","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-10-12T23:53:36Z","receivedAt":"2014-10-12T23:53:36Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Oct 12, 2014 at 9:58 AM, Dun Peal <dunpealer@gmail.com> wrote:\n> I have the pattern `*.out` defined in my `core.excludesfile`.\n> According to the documentation[1], patterns defined in\n> `$GIT_DIR/info/exclude` take precedence over `core.excludesfile`, so\n> for one particular project that needs to track some `.out` files, I\n> created `$GIT_DIR/info/exclude` with just one pattern: `!*.out`.\n>\n> Yet for some reason, `git status` still fails to report newly created\n> `.out` files for that project. Am I misunderstanding the\n> documentation?\n\nWe process in groups, so rules in core.excludesfile are in one group,\nthose in $GIT_DIR/info/exclude in another group. Negative patterns\nonly has effects within their group, so !*out in .../exclude can't\nrevert *.out in core.excludesfile. Probably implementation limitation,\nnot by design..\n\nBut even if we flatten them into one group, i'm not sure you can\nachieve that. The patterns would be\n\n!*.out\n*.out\n\n\"!*.out\" has nothing to revert because it's before \"*.out\".\n-- \nDuy\n"},{"id":"250537","messageId":"CAD03jn5s2NzcSDdwZ_SYe1Q1uq8gt+meeJycEcmzAj3SbZOJ4w@mail.gmail.com","threadId":"37719","inReplyTo":"CACsJy8Aj-_VhiiG9ogoABaGs69TQ+HyEnOVb75UT53W5+YcKVg@mail.gmail.com","subject":"Re: $GIT_DIR/info/exclude fails to negate a pattern defined by core.excludesfile","fromName":"Dun Peal","fromEmail":"dunpealer@gmail.com","sentAt":"2014-10-13T13:23:33Z","receivedAt":"2014-10-13T13:23:33Z","isPatch":false,"sender":{"key":"dunpealer@gmail.com","avatar":"https://gravatar.com/avatar/42f3e6a1166eb44e33f24c20ccbe809fa8591413f366dfe3755c8a8d4935ace9?d=mp&s=160"},"body":"Hey Duy,\n\nI'm not sure why the pattern would have to be as you describe - I'm\njust looking to ignore `*.out` as a general configuration, and disable\nit for one specific project, so it would seem a plain `!*.out` should\nwork.\n\nIn any case, I added a `.gitignore` file with the single pattern\n`!*.out` at the root of the project, and now .out files are no longer\nignored for the project.\n\nIt's not an ideal solution because now all the other developers of the\nproject who do not have `*.out` in their `core.excludesfile` will have\nan unnecessary pattern in their exclusion logic, but it does work as\nexpected.\n\nThanks, D.\n\nOn Sun, Oct 12, 2014 at 7:53 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n> On Sun, Oct 12, 2014 at 9:58 AM, Dun Peal <dunpealer@gmail.com> wrote:\n>> I have the pattern `*.out` defined in my `core.excludesfile`.\n>> According to the documentation[1], patterns defined in\n>> `$GIT_DIR/info/exclude` take precedence over `core.excludesfile`, so\n>> for one particular project that needs to track some `.out` files, I\n>> created `$GIT_DIR/info/exclude` with just one pattern: `!*.out`.\n>>\n>> Yet for some reason, `git status` still fails to report newly created\n>> `.out` files for that project. Am I misunderstanding the\n>> documentation?\n>\n> We process in groups, so rules in core.excludesfile are in one group,\n> those in $GIT_DIR/info/exclude in another group. Negative patterns\n> only has effects within their group, so !*out in .../exclude can't\n> revert *.out in core.excludesfile. Probably implementation limitation,\n> not by design..\n>\n> But even if we flatten them into one group, i'm not sure you can\n> achieve that. The patterns would be\n>\n> !*.out\n> *.out\n>\n> \"!*.out\" has nothing to revert because it's before \"*.out\".\n> --\n> Duy\n"}]}