{"thread":{"id":"54558","subject":"git clean -Xdf doesn't clean ignored files in subfolders","startedAt":"2020-11-02T22:44:58Z","lastAt":"2020-11-03T19:14:37Z","messageCount":4,"participants":["David Besen","Elijah Newren"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"408950","messageId":"CAHqVHwt1QJjXCAbDD5ViZ1E_rD8u+H_XeJ=FOv4VFPTS8y3xjg@mail.gmail.com","threadId":"54558","inReplyTo":null,"subject":"git clean -Xdf doesn't clean ignored files in subfolders","fromName":"David Besen","fromEmail":"dbesen@gmail.com","sentAt":"2020-11-02T22:44:43Z","receivedAt":"2020-11-02T22:44:58Z","isPatch":false,"sender":{"key":"dbesen@gmail.com","avatar":null},"body":"Hi!\n\nI'm seeing some unexpected behavior with git clean:\n\ngit init test\ncd test\necho \"ignored.txt\" > .gitignore\nmkdir folder\ntouch folder/ignored.txt\ngit clean -Xdf\n\nI'd expect this to delete folder/ignored.txt, and instead it doesn't.\nI'm in git 2.29.2 on osx.\n\nI saw that git clean -xdn does delete the file, so if this is a bug\nit's limited to -X.\n\nThanks!\nDave\n"},{"id":"409019","messageId":"CABPp-BEF2wqP+Cx5-6yq6cfQ1Pa+8iOXWR11DNBH02yh-D8oFg@mail.gmail.com","threadId":"54558","inReplyTo":"CAHqVHwt1QJjXCAbDD5ViZ1E_rD8u+H_XeJ=FOv4VFPTS8y3xjg@mail.gmail.com","subject":"Re: git clean -Xdf doesn't clean ignored files in subfolders","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-11-03T17:11:31Z","receivedAt":"2020-11-03T17:11:44Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Mon, Nov 2, 2020 at 2:46 PM David Besen <dbesen@gmail.com> wrote:\n>\n> Hi!\n>\n> I'm seeing some unexpected behavior with git clean:\n>\n> git init test\n> cd test\n> echo \"ignored.txt\" > .gitignore\n> mkdir folder\n> touch folder/ignored.txt\n> git clean -Xdf\n>\n> I'd expect this to delete folder/ignored.txt, and instead it doesn't.\n> I'm in git 2.29.2 on osx.\n>\n> I saw that git clean -xdn does delete the file, so if this is a bug\n> it's limited to -X.\n\nIs this the same issue as reported at\nhttps://lore.kernel.org/git/4F1384AE.1050209@pcharlan.com/?\n"},{"id":"409029","messageId":"CAHqVHwv4BC-OnfCvXySvksGHCx_+URQedz-BT6CqGbndDTM8Tw@mail.gmail.com","threadId":"54558","inReplyTo":"CABPp-BEF2wqP+Cx5-6yq6cfQ1Pa+8iOXWR11DNBH02yh-D8oFg@mail.gmail.com","subject":"Re: git clean -Xdf doesn't clean ignored files in subfolders","fromName":"David Besen","fromEmail":"dbesen@gmail.com","sentAt":"2020-11-03T18:34:39Z","receivedAt":"2020-11-03T18:34:52Z","isPatch":false,"sender":{"key":"dbesen@gmail.com","avatar":null},"body":"> Is this the same issue as reported at\n> https://lore.kernel.org/git/4F1384AE.1050209@pcharlan.com/?\n\nYes, I believe so.  I am indeed using git clean as a substitute for make clean.\n\nBut, I still think a fix would be appropriate.  Ideally I could trust\ngit to remove all auto-generated files regardless of whether or not\nthe project even has a Makefile.\n"},{"id":"409035","messageId":"CABPp-BHewkGXj41tLagMQ-DtdxqU2q=WpMqX+xziePtERt23MA@mail.gmail.com","threadId":"54558","inReplyTo":"CAHqVHwv4BC-OnfCvXySvksGHCx_+URQedz-BT6CqGbndDTM8Tw@mail.gmail.com","subject":"Re: git clean -Xdf doesn't clean ignored files in subfolders","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-11-03T19:14:22Z","receivedAt":"2020-11-03T19:14:37Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Tue, Nov 3, 2020 at 10:36 AM David Besen <dbesen@gmail.com> wrote:\n>\n> > Is this the same issue as reported at\n> > https://lore.kernel.org/git/4F1384AE.1050209@pcharlan.com/?\n>\n> Yes, I believe so.  I am indeed using git clean as a substitute for make clean.\n>\n> But, I still think a fix would be appropriate.  Ideally I could trust\n> git to remove all auto-generated files regardless of whether or not\n> the project even has a Makefile.\n\nI'm not trying to argue against a fix, just verifying that it wasn't\nrecent changes that might have caused problems, and linking the\nreports together in the archive with a url to help anyone interested\nbe able to find them.\n"}]}