{"thread":{"id":"46594","subject":"git clean -fdx deletes tracked files","startedAt":"2017-08-15T18:45:47Z","lastAt":"2017-08-17T00:13:43Z","messageCount":4,"participants":["Kim Birkelund","Kevin Daudt","Andrew Ardill"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"326436","messageId":"CAOCG=_p--J5PKGrQTdquMvcBNQs67MNaN3vM8Tbwn2nZNwVR+Q@mail.gmail.com","threadId":"46594","inReplyTo":null,"subject":"git clean -fdx deletes tracked files","fromName":"Kim Birkelund","fromEmail":"kim@birkelund.me","sentAt":"2017-08-15T18:45:20Z","receivedAt":"2017-08-15T18:45:47Z","isPatch":false,"sender":{"key":"kim@birkelund.me","avatar":null},"body":"Hi\n\nI hope this is gonna sound as weird to you as it does to me.\n\nThe link below is a zip of a small git repository that I can reproduce\nthe bug in on 2 machines.\n\nRepo: https://www.dropbox.com/s/fz4d0i5ko7s7ktr/test.zip?dl=0\n\nIt contains 2 folders: helpers and b, each of which is an empty npm\nmodule. b\\package.json refers to the helpers module.\n\nThe following reproduces the bug:\n\n1) in terminal cd to the b folder\n2) run npm install\n3) run git reset HEAD --hard\n4) run git clean -fdx\n\nAt this point both files in the helpers folder has been deleted and\nrunning git status confirms this.\n\nTool version:\n\ngit --version => git version 2.10.2.windows.1\nnode -v => v6.11.2\nnpm -v => 5.3.0\n\n\nI have no idea what is going. Very much hope you can explain :-)\n"},{"id":"326445","messageId":"20170815192543.GB3839@alpha.vpn.ikke.info","threadId":"46594","inReplyTo":"CAOCG=_p--J5PKGrQTdquMvcBNQs67MNaN3vM8Tbwn2nZNwVR+Q@mail.gmail.com","subject":"Re: git clean -fdx deletes tracked files","fromName":"Kevin Daudt","fromEmail":"me@ikke.info","sentAt":"2017-08-15T19:25:43Z","receivedAt":"2017-08-15T19:25:55Z","isPatch":false,"sender":{"key":"me@ikke.info","avatar":"https://avatars.githubusercontent.com/u/135698?v=4"},"body":"On Tue, Aug 15, 2017 at 08:45:20PM +0200, Kim Birkelund wrote:\n> Hi\n> \n> I hope this is gonna sound as weird to you as it does to me.\n> \n> The link below is a zip of a small git repository that I can reproduce\n> the bug in on 2 machines.\n> \n> Repo: https://www.dropbox.com/s/fz4d0i5ko7s7ktr/test.zip?dl=0\n> \n> It contains 2 folders: helpers and b, each of which is an empty npm\n> module. b\\package.json refers to the helpers module.\n> \n> The following reproduces the bug:\n> \n> 1) in terminal cd to the b folder\n> 2) run npm install\n> 3) run git reset HEAD --hard\n> 4) run git clean -fdx\n> \n> At this point both files in the helpers folder has been deleted and\n> running git status confirms this.\n> \n> Tool version:\n> \n> git --version => git version 2.10.2.windows.1\n> node -v => v6.11.2\n> npm -v => 5.3.0\n> \n> \n> I have no idea what is going. Very much hope you can explain :-)\n\nI cannot reproduce it on linux.\n\ngit clean -fdx output:\n\n  Removing node_modules/\n  Removing package-lock.json\n\nThese are all untracked, and nothing in the helpers dir is being\nremoved.\n\n"},{"id":"326490","messageId":"CAOCG=_pKCXbsRtxNN3+qn+28i_1ZXZJ4Nyf2LLSF78irbyoqFA@mail.gmail.com","threadId":"46594","inReplyTo":"20170815192543.GB3839@alpha.vpn.ikke.info","subject":"Re: git clean -fdx deletes tracked files","fromName":"Kim Birkelund","fromEmail":"kim@birkelund.me","sentAt":"2017-08-16T06:47:58Z","receivedAt":"2017-08-16T06:49:51Z","isPatch":false,"sender":{"key":"kim@birkelund.me","avatar":null},"body":"Apologies. I should obviously have mentioned which OSes the machines I\ntested on ran.\n\nOne Windows 10 (fully updated) and one Windows Server 2016 (also\nupdated). I've also seen it in a real repository on our build server\nwhich is Windows Server 2012 R2.\n\nAfter my first mail I updated git to latest and could still reproduce.\n\n\n\nOn Aug 15, 2017 21:25, \"Kevin Daudt\" <me@ikke.info> wrote:\n\nOn Tue, Aug 15, 2017 at 08:45:20PM +0200, Kim Birkelund wrote:\n> Hi\n>\n> I hope this is gonna sound as weird to you as it does to me.\n>\n> The link below is a zip of a small git repository that I can reproduce\n> the bug in on 2 machines.\n>\n> Repo: https://www.dropbox.com/s/fz4d0i5ko7s7ktr/test.zip?dl=0\n>\n> It contains 2 folders: helpers and b, each of which is an empty npm\n> module. b\\package.json refers to the helpers module.\n>\n> The following reproduces the bug:\n>\n> 1) in terminal cd to the b folder\n> 2) run npm install\n> 3) run git reset HEAD --hard\n> 4) run git clean -fdx\n>\n> At this point both files in the helpers folder has been deleted and\n> running git status confirms this.\n>\n> Tool version:\n>\n> git --version => git version 2.10.2.windows.1\n> node -v => v6.11.2\n> npm -v => 5.3.0\n>\n>\n> I have no idea what is going. Very much hope you can explain :-)\n\nI cannot reproduce it on linux.\n\ngit clean -fdx output:\n\n  Removing node_modules/\n  Removing package-lock.json\n\nThese are all untracked, and nothing in the helpers dir is being\nremoved.\n"},{"id":"326570","messageId":"CAH5451==kzQxbmVmbVT5JeTDSJGY05B0hzFyvnBMndv-iGg7Xw@mail.gmail.com","threadId":"46594","inReplyTo":"CAOCG=_pKCXbsRtxNN3+qn+28i_1ZXZJ4Nyf2LLSF78irbyoqFA@mail.gmail.com","subject":"Re: git clean -fdx deletes tracked files","fromName":"Andrew Ardill","fromEmail":"andrew.ardill@gmail.com","sentAt":"2017-08-17T00:12:57Z","receivedAt":"2017-08-17T00:13:43Z","isPatch":false,"sender":{"key":"andrew.ardill@gmail.com","avatar":"https://gravatar.com/avatar/da14cb7c091dd44dc6c63a4d3361b149acaf25226dc78eb4131a17b93d9b0993?d=mp&s=160"},"body":"Hi Kim,\n\nI have cc'd the git for windows mailing list, but doing a quick search\non the bug tracker shows this issue which looks related:\nhttps://github.com/git-for-windows/git/issues/607\n\nHope that helps, seems like it may be an issue with how junctions on\nwindows are handled by git.\n\nRegards,\n\nAndrew Ardill\n\n\nOn 16 August 2017 at 16:47, Kim Birkelund <kim@birkelund.me> wrote:\n> Apologies. I should obviously have mentioned which OSes the machines I\n> tested on ran.\n>\n> One Windows 10 (fully updated) and one Windows Server 2016 (also\n> updated). I've also seen it in a real repository on our build server\n> which is Windows Server 2012 R2.\n>\n> After my first mail I updated git to latest and could still reproduce.\n>\n>\n>\n> On Aug 15, 2017 21:25, \"Kevin Daudt\" <me@ikke.info> wrote:\n>\n> On Tue, Aug 15, 2017 at 08:45:20PM +0200, Kim Birkelund wrote:\n>> Hi\n>>\n>> I hope this is gonna sound as weird to you as it does to me.\n>>\n>> The link below is a zip of a small git repository that I can reproduce\n>> the bug in on 2 machines.\n>>\n>> Repo: https://www.dropbox.com/s/fz4d0i5ko7s7ktr/test.zip?dl=0\n>>\n>> It contains 2 folders: helpers and b, each of which is an empty npm\n>> module. b\\package.json refers to the helpers module.\n>>\n>> The following reproduces the bug:\n>>\n>> 1) in terminal cd to the b folder\n>> 2) run npm install\n>> 3) run git reset HEAD --hard\n>> 4) run git clean -fdx\n>>\n>> At this point both files in the helpers folder has been deleted and\n>> running git status confirms this.\n>>\n>> Tool version:\n>>\n>> git --version => git version 2.10.2.windows.1\n>> node -v => v6.11.2\n>> npm -v => 5.3.0\n>>\n>>\n>> I have no idea what is going. Very much hope you can explain :-)\n>\n> I cannot reproduce it on linux.\n>\n> git clean -fdx output:\n>\n>   Removing node_modules/\n>   Removing package-lock.json\n>\n> These are all untracked, and nothing in the helpers dir is being\n> removed.\n"}]}