{"thread":{"id":"51213","subject":"[bug?] clean: Demonstrate failure when used with paths","startedAt":"2019-05-31T18:37:29Z","lastAt":"2019-06-03T20:32:28Z","messageCount":3,"participants":["Rafael Ascensão","Elijah Newren"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"376496","messageId":"20190531183651.10067-1-rafa.almas@gmail.com","threadId":"51213","inReplyTo":null,"subject":"[bug?] clean: Demonstrate failure when used with paths","fromName":"Rafael Ascensão","fromEmail":"rafa.almas@gmail.com","sentAt":"2019-05-31T18:36:51Z","receivedAt":"2019-05-31T18:37:29Z","isPatch":false,"sender":{"key":"rafa.almas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1923789?v=4"},"body":"---\n\nYesterday on #git, an user reported the following behaviour of\ngit clean:\n\n    $ git init\n    $ mkdir foo\n    $ touch a.txt b.txt bar.txt foo/qux.txt\n\n    $ git clean -f bar.txt foo/qux.txt\n    Removing bar.txt\n\nWhere the behaviour they expected would be:\n\n    $ git clean -f bar.txt foo/qux.txt\n    Removing bar.txt\n    Removing foo/qux.txt\n\nSending this \"patch\" as an excuse to not forget this bug report.\n\n t/t7300-clean.sh | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/t/t7300-clean.sh b/t/t7300-clean.sh\nindex 7b36954d63..eecbd98906 100755\n--- a/t/t7300-clean.sh\n+++ b/t/t7300-clean.sh\n@@ -92,6 +92,20 @@ test_expect_success 'git clean src/ src/' '\n \n '\n \n+test_expect_failure 'git clean a.out docs/manual.tmp' '\n+\tmkdir -p build docs &&\n+\ttouch a.out b.out docs/manual.txt docs/manual.tmp &&\n+\tgit clean a.out docs/manual.tmp &&\n+\ttest -f Makefile &&\n+\ttest -f README &&\n+\ttest ! -f a.out &&\n+\ttest -f b.out &&\n+\ttest -f docs/manual.txt &&\n+\ttest ! -f docs/manual.tmp &&\n+\ttest -f src/part2.c &&\n+\ttest -f src/part1.c\n+'\n+\n test_expect_success 'git clean with prefix' '\n \n \tmkdir -p build docs src/test &&\n-- \n2.21.0\n\n"},{"id":"376598","messageId":"CACUQV59ZQ=WLXa4iDw3nSJWnZpiqAYLOuoHKsNWj48uC=+k5KQ@mail.gmail.com","threadId":"51213","inReplyTo":"20190531183651.10067-1-rafa.almas@gmail.com","subject":"Re: [bug?] clean: Demonstrate failure when used with paths","fromName":"Rafael Ascensão","fromEmail":"rafa.almas@gmail.com","sentAt":"2019-06-03T19:57:30Z","receivedAt":"2019-06-03T19:58:09Z","isPatch":false,"sender":{"key":"rafa.almas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1923789?v=4"},"body":"I missed this RFC series which fixes this and others issues:\nhttps://public-inbox.org/git/20180405173446.32372-1-newren@gmail.com\n\nCheers,\nRafael Ascensão\n"},{"id":"376613","messageId":"CABPp-BFfYFj232cHd6_NTkEg1n8AOQ4Abm7ZrnLPWHJEDzUPsg@mail.gmail.com","threadId":"51213","inReplyTo":"CACUQV59ZQ=WLXa4iDw3nSJWnZpiqAYLOuoHKsNWj48uC=+k5KQ@mail.gmail.com","subject":"Re: [bug?] clean: Demonstrate failure when used with paths","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2019-06-03T20:32:13Z","receivedAt":"2019-06-03T20:32:28Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Mon, Jun 3, 2019 at 12:58 PM Rafael Ascensão <rafa.almas@gmail.com> wrote:\n>\n> I missed this RFC series which fixes this and others issues:\n> https://public-inbox.org/git/20180405173446.32372-1-newren@gmail.com\n>\n> Cheers,\n> Rafael Ascensão\n\nYeah, I've had cleaning that patch series up on my TODO list for quite\nsome time.\n\nMy vague recollection was that Peff pointed out a few things to clean\nup in my patches, and also highlighted a few extra adjacent issues in\nthe surrounding underlying code...and when I started looking into\nfixing the additional stuff it was slightly more complex and ugly (and\nfor some reason I didn't decide to just fix up and submit what I had\nbut was trying to fix everything in the area).\n\nAlso, briefly looking back at the cover letter and thread overview it\nlooks like no one ever attempted to shed light on the question I asked\nin my RFC about what correct behavior was for one special case (i.e.\nwhether patches 5 & 6 of that series should be kept or whether they\nshould be dropped and patch 7 should be squashed into earlier\npatches).  Anyone have thoughts on that?\n\nElijah\n"}]}