{"thread":{"id":"50339","subject":"There should be a `.gitbless; file, protecting files from git clean","startedAt":"2019-01-28T02:52:45Z","lastAt":"2019-01-29T01:01:11Z","messageCount":8,"participants":["Sebastian Gniazdowski","Duy Nguyen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"367813","messageId":"etPan.5c4e6be4.2ca84d68.4d5@zdharma.org","threadId":"50339","inReplyTo":null,"subject":"There should be a `.gitbless; file, protecting files from git clean","fromName":"Sebastian Gniazdowski","fromEmail":"psprint@zdharma.org","sentAt":"2019-01-28T02:41:39Z","receivedAt":"2019-01-28T02:52:45Z","isPatch":false,"sender":{"key":"psprint@zdharma.org","avatar":null},"body":"Hello,\nKeepiing repo clean with `git clean -dxf' is a very pleasant experience. However, ability to use it ends when one gets untracked but *wanted* files in the repo, like an untracked TODO.\n\nCould a .gitbless file be a solution? I would list in it, e.g.:\n\nTODO\n\nand this way be able to use `git -dxf' again. What do you think?\n\n-- \nSebastian Gniazdowski \nNews: https://twitter.com/ZdharmaI\nIRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin\nBlog: http://zdharma.org\n\n"},{"id":"367814","messageId":"CACsJy8BMc9k3Q=P=2CaJ9yyXhc4C_BgGVO=S_J0_R8zDweahLQ@mail.gmail.com","threadId":"50339","inReplyTo":"etPan.5c4e6be4.2ca84d68.4d5@zdharma.org","subject":"Re: There should be a `.gitbless; file, protecting files from git clean","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2019-01-28T05:05:31Z","receivedAt":"2019-01-28T05:06:01Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Jan 28, 2019 at 9:54 AM Sebastian Gniazdowski\n<psprint@zdharma.org> wrote:\n>\n> Hello,\n> Keepiing repo clean with `git clean -dxf' is a very pleasant experience. However, ability to use it ends when one gets untracked but *wanted* files in the repo, like an untracked TODO.\n>\n> Could a .gitbless file be a solution? I would list in it, e.g.:\n>\n> TODO\n>\n> and this way be able to use `git -dxf' again. What do you think?\n\nThere's a patch that adds \"precious\" git attribute [1]. I was going to\nresend once the backup-log [2] got reviewed but I might just send it\nseparately to handle the \"git clean\" case alone.\n\n[1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/\n[2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/\n\n>\n> --\n> Sebastian Gniazdowski\n> News: https://twitter.com/ZdharmaI\n> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin\n> Blog: http://zdharma.org\n>\n\n\n-- \nDuy\n"},{"id":"367815","messageId":"etPan.5c4e9217.46ea0041.4d5@zdharma.org","threadId":"50339","inReplyTo":"CACsJy8BMc9k3Q=P=2CaJ9yyXhc4C_BgGVO=S_J0_R8zDweahLQ@mail.gmail.com","subject":"Re: There should be a `.gitbless; file, protecting files from git clean","fromName":"Sebastian Gniazdowski","fromEmail":"psprint@zdharma.org","sentAt":"2019-01-28T05:24:39Z","receivedAt":"2019-01-28T05:33:27Z","isPatch":false,"sender":{"key":"psprint@zdharma.org","avatar":null},"body":"On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:\n> On Mon, Jan 28, 2019 at 9:54 AM Sebastian Gniazdowski\n> wrote:\n> >\n> > Hello,\n> > Could a .gitbless file be a solution? I would list in it, e.g.:\n> >\n> > TODO\n> >\n> > and this way be able to use `git -dxf' again. What do you think?\n> \n> There's a patch that adds \"precious\" git attribute [1]. I was going to\n> resend once the backup-log [2] got reviewed but I might just send it\n> separately to handle the \"git clean\" case alone.\n\nThat would be nice solution. In the email, you ask for a name other than \"precious\". So maybe \"blessed\"?\n\n-- \nSebastian Gniazdowski \nNews: https://twitter.com/ZdharmaI\nIRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin\nBlog: http://zdharma.org\n\n"},{"id":"367816","messageId":"etPan.5c4e9fd0.4526aacd.4d5@zdharma.org","threadId":"50339","inReplyTo":"CACsJy8BMc9k3Q=P=2CaJ9yyXhc4C_BgGVO=S_J0_R8zDweahLQ@mail.gmail.com","subject":"Re: There should be a `.gitbless; file, protecting files from git clean","fromName":"Sebastian Gniazdowski","fromEmail":"psprint@zdharma.org","sentAt":"2019-01-28T06:23:12Z","receivedAt":"2019-01-28T06:23:16Z","isPatch":false,"sender":{"key":"psprint@zdharma.org","avatar":null},"body":"I like the idea of the backup-log, I hope it gets commited!\n\nOn 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:\n> \n> There's a patch that adds \"precious\" git attribute [1]. I was going to\n> resend once the backup-log [2] got reviewed but I might just send it\n> separately to handle the \"git clean\" case alone.\n> \n> [1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/ \n> [2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/ \n> \n> >\n> > --\n> > Sebastian Gniazdowski\n> > News: https://twitter.com/ZdharmaI\n> > IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin\n> > Blog: http://zdharma.org\n> >\n> \n> \n> --\n> Duy\n> \n\n-- \nSebastian Gniazdowski \nNews: https://twitter.com/ZdharmaI\nIRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin\nBlog: http://zdharma.org\n\n"},{"id":"367830","messageId":"etPan.5c4f2017.992f4fd.4d5@zdharma.org","threadId":"50339","inReplyTo":"CACsJy8BMc9k3Q=P=2CaJ9yyXhc4C_BgGVO=S_J0_R8zDweahLQ@mail.gmail.com","subject":"Re: There should be a `.gitbless; file, protecting files from git clean","fromName":"Sebastian Gniazdowski","fromEmail":"psprint@zdharma.org","sentAt":"2019-01-28T15:30:31Z","receivedAt":"2019-01-28T15:30:35Z","isPatch":false,"sender":{"key":"psprint@zdharma.org","avatar":null},"body":"\n\nOn 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:\n> There's a patch that adds \"precious\" git attribute [1]. I was going to\n> resend once the backup-log [2] got reviewed but I might just send it\n> separately to handle the \"git clean\" case alone.\n> \n> [1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/ \n> [2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/ \n\n\nThe backup log, if done properly, could allow to use git more freely, without nerves that something will beak. I wonder if it could restore also the state before an improper `git clea -dxf' call? I think the chances are low, because this would requrire to save untracked files, but it's worth asking?\n\n-- \nSebastian Gniazdowski \nNews: https://twitter.com/ZdharmaI\nIRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin\nBlog: http://zdharma.org\n\n"},{"id":"367848","messageId":"xmqqlg34bqpq.fsf@gitster-ct.c.googlers.com","threadId":"50339","inReplyTo":"CACsJy8BMc9k3Q=P=2CaJ9yyXhc4C_BgGVO=S_J0_R8zDweahLQ@mail.gmail.com","subject":"Re: There should be a `.gitbless; file, protecting files from git clean","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-01-28T18:08:01Z","receivedAt":"2019-01-28T18:08:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> There's a patch that adds \"precious\" git attribute [1]. I was going to\n> resend once the backup-log [2] got reviewed but I might just send it\n> separately to handle the \"git clean\" case alone.\n\nThanks.\n"},{"id":"367908","messageId":"CACsJy8Br9+m0pcErXDSsAMhhFd1xd8X0LfvLJvy63P45TX-zGQ@mail.gmail.com","threadId":"50339","inReplyTo":"etPan.5c4e9217.46ea0041.4d5@zdharma.org","subject":"Re: There should be a `.gitbless; file, protecting files from git clean","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2019-01-29T00:48:45Z","receivedAt":"2019-01-29T00:49:13Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Jan 28, 2019 at 12:24 PM Sebastian Gniazdowski\n<psprint@zdharma.org> wrote:\n>\n> On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:\n> > On Mon, Jan 28, 2019 at 9:54 AM Sebastian Gniazdowski\n> > wrote:\n> > >\n> > > Hello,\n> > > Could a .gitbless file be a solution? I would list in it, e.g.:\n> > >\n> > > TODO\n> > >\n> > > and this way be able to use `git -dxf' again. What do you think?\n> >\n> > There's a patch that adds \"precious\" git attribute [1]. I was going to\n> > resend once the backup-log [2] got reviewed but I might just send it\n> > separately to handle the \"git clean\" case alone.\n>\n> That would be nice solution. In the email, you ask for a name other than \"precious\". So maybe \"blessed\"?\n\nThere's a couple mail replies in that thread that pointed out\n\"precious\" has been used elsewhere (I think Makefile is one) so I\nthink I'm going to stick with \"precious\". Besides it sounds \"precious\"\n:D\n-- \nDuy\n"},{"id":"367909","messageId":"CACsJy8AjMamr3kNf67SkYxKrDPHWcf=W2eArMRMnX3H6hXWe7A@mail.gmail.com","threadId":"50339","inReplyTo":"etPan.5c4f2017.992f4fd.4d5@zdharma.org","subject":"Re: There should be a `.gitbless; file, protecting files from git clean","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2019-01-29T01:00:43Z","receivedAt":"2019-01-29T01:01:11Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Jan 28, 2019 at 10:30 PM Sebastian Gniazdowski\n<psprint@zdharma.org> wrote:\n>\n>\n>\n> On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:\n> > There's a patch that adds \"precious\" git attribute [1]. I was going to\n> > resend once the backup-log [2] got reviewed but I might just send it\n> > separately to handle the \"git clean\" case alone.\n> >\n> > [1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/\n> > [2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/\n>\n>\n> The backup log, if done properly, could allow to use git more freely, without nerves that something will beak. I wonder if it could restore also the state before an improper `git clea -dxf' call? I think the chances are low, because this would requrire to save untracked files, but it's worth asking?\n\nbackup-log already saves untracked files for \"git reset --hard\"\nsupport if I remember correctly. Adding support for \"git clean\" is not\nthat big a deal. It's just the matter whether to turn it on by default\n(because there will be a lot of files being backed up). But now that I\nthink about it, if backup log is enabled, perhaps we allow \"git clean\n-dx\" (without -f or -i) which will back up all deleted files, while\n-fdx will not. Hmm...\n-- \nDuy\n"}]}