{"thread":{"id":"51628","subject":"Git add claims path is ignored, but git check-ignore returns no results","startedAt":"2019-08-12T16:25:04Z","lastAt":"2019-08-12T16:50:32Z","messageCount":3,"participants":["geoffsimons@aim.com","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"380314","messageId":"1229468090.3098018.1565627099656@mail.yahoo.com","threadId":"51628","inReplyTo":"1229468090.3098018.1565627099656.ref@mail.yahoo.com","subject":"Git add claims path is ignored, but git check-ignore returns no results","fromName":"","fromEmail":"geoffsimons@aim.com","sentAt":"2019-08-12T16:24:59Z","receivedAt":"2019-08-12T16:25:04Z","isPatch":false,"sender":{"key":"geoffsimons@aim.com","avatar":null},"body":"Hi,\n\nI’m struggling with this.  Adding a renamed file to git claims that it is ignored, but git check-ignore returns no results.  \nI can’t find anything relevant in .git/info/exclude either, or any of the .gitignore files I could find.\n\ngit check-ignore .\\Source\\UI\\Website\\LiveFeeds\\Releases\\IO\\ReleasesSerializer.cs\ngit add .\\Source\\ui\\Website\\LiveFeeds\\Releases\\io\\ReleasesSerializer.cs\nThe following paths are ignored by one of your .gitignore files:\nSource/ui/Website/LiveFeeds/Releases/io/ReleasesSerializer.cs\nUse -f if you really want to add them.\n\nI get a similar result for adding files in that directory, or the parent directory (releases), but the grandparent directory (livefeeds) works fine.  Any ideas what might be causing this?\n\nRegards,\n\nGeoff\n"},{"id":"380315","messageId":"20190812163517.GA26231@sigill.intra.peff.net","threadId":"51628","inReplyTo":"1229468090.3098018.1565627099656@mail.yahoo.com","subject":"Re: Git add claims path is ignored, but git check-ignore returns no results","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2019-08-12T16:35:17Z","receivedAt":"2019-08-12T16:35:20Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 12, 2019 at 04:24:59PM +0000, geoffsimons@aim.com wrote:\n\n> I can’t find anything relevant in .git/info/exclude either, or any of\n> the .gitignore files I could find.\n> \n> git check-ignore .\\Source\\UI\\Website\\LiveFeeds\\Releases\\IO\\ReleasesSerializer.cs\n> git add .\\Source\\ui\\Website\\LiveFeeds\\Releases\\io\\ReleasesSerializer.cs\n> The following paths are ignored by one of your .gitignore files:\n> Source/ui/Website/LiveFeeds/Releases/io/ReleasesSerializer.cs\n> Use -f if you really want to add them.\n> \n> I get a similar result for adding files in that directory, or the\n> parent directory (releases), but the grandparent directory (livefeeds)\n> works fine.  Any ideas what might be causing this?\n\nI notice that your \"add\" and \"check-ignore\" commands differ in the case\nof \"UI\". I think both commands should work correctly when on a\ncase-insensitive filesystem (and a few checks I did after setting\ncore.ignorecase manually seem to confirm this).\n\nBut maybe try it with \"ui\" in the check-ignore command and see if that\nchanges anything?\n\nAnother thing I notice is that you're using Windows-style back-slashes\nfor the path separators (whereas internally in Git, everything is\nfront-slashes). AFAIK that's supposed to work everywhere on Windows, but\nI wouldn't be surprised if there are corner cases where it doesn't. Does\nswitching to:\n\n  git check-ignore ./Source/ui/Website/LiveFeeds/Releases/IO/ReleasesSerializer.cs\n\nhelp?\n\n-Peff\n"},{"id":"380318","messageId":"1329290481.3118350.1565628612179@mail.yahoo.com","threadId":"51628","inReplyTo":"20190812163517.GA26231@sigill.intra.peff.net","subject":"Re: Git add claims path is ignored, but git check-ignore returns no results","fromName":"","fromEmail":"geoffsimons@aim.com","sentAt":"2019-08-12T16:50:12Z","receivedAt":"2019-08-12T16:50:32Z","isPatch":false,"sender":{"key":"geoffsimons@aim.com","avatar":null},"body":"\nHi Peff,\n\nThanks, I didn't think that would make any difference either, but changing the case resolved it! I'm now able to find the relevant line in the .gitignore file.\n\nRegards,\n\nGeoff\n\n-----Original Message-----\nFrom: Jeff King <peff@peff.net>\nTo: geoffsimons <geoffsimons@aim.com>\nCC: git <git@vger.kernel.org>\nSent: Mon, 12 Aug 2019 17:35\nSubject: Re: Git add claims path is ignored, but git check-ignore returns no results\n\nOn Mon, Aug 12, 2019 at 04:24:59PM +0000, geoffsimons@aim.com wrote:\n\n\n> I can’t find anything relevant in .git/info/exclude either, or any of\n> the .gitignore files I could find.\n> \n> git check-ignore .\\Source\\UI\\Website\\LiveFeeds\\Releases\\IO\\ReleasesSerializer.cs\n> git add .\\Source\\ui\\Website\\LiveFeeds\\Releases\\io\\ReleasesSerializer.cs\n> The following paths are ignored by one of your .gitignore files:\n> Source/ui/Website/LiveFeeds/Releases/io/ReleasesSerializer.cs\n> Use -f if you really want to add them.\n> \n> I get a similar result for adding files in that directory, or the\n> parent directory (releases), but the grandparent directory (livefeeds)\n> works fine.  Any ideas what might be causing this?\n\n\nI notice that your \"add\" and \"check-ignore\" commands differ in the case\nof \"UI\". I think both commands should work correctly when on a\ncase-insensitive filesystem (and a few checks I did after setting\ncore.ignorecase manually seem to confirm this).\n\nBut maybe try it with \"ui\" in the check-ignore command and see if that\nchanges anything?\n\nAnother thing I notice is that you're using Windows-style back-slashes\nfor the path separators (whereas internally in Git, everything is\nfront-slashes). AFAIK that's supposed to work everywhere on Windows, but\nI wouldn't be surprised if there are corner cases where it doesn't. Does\nswitching to:\n\n  git check-ignore ./Source/ui/Website/LiveFeeds/Releases/IO/ReleasesSerializer.cs\n\nhelp?\n\n-Peff\n\n\n"}]}