threads / discuss / 50339

There should be a `.gitbless; file, protecting files from git clean

Subject: There should be a `.gitbless; file, protecting files from git clean

## tl;dr

8 messages between Jan 28, 2019 and Jan 29, 2019.

replies: 7people: 3as markdown or json

Sebastian Gniazdowski· Jan 28, 2019, 02:41 UTC · lore

Hello, 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.

Could a .gitbless file be a solution? I would list in it, e.g.:
TODO
and this way be able to use `git -dxf' again. What do you think?
-- 
Sebastian Gniazdowski 
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Duy Nguyen· Jan 28, 2019, 05:05 UTC · re: Sebastian Gniazdowski · lore

Re: There should be a `.gitbless; file, protecting files from git clean

On Mon, Jan 28, 2019 at 9:54 AM Sebastian Gniazdowski <psprint@zdharma.org> wrote:

Show 9 quoted lines
>
> Hello,
> 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.
>
> Could a .gitbless file be a solution? I would list in it, e.g.:
>
> TODO
>
> and this way be able to use `git -dxf' again. What do you think?

There's a patch that adds "precious" git attribute [1]. I was going to resend once the backup-log [2] got reviewed but I might just send it separately to handle the "git clean" case alone.

[1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/ [2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/

Show 7 quoted lines
>
> --
> Sebastian Gniazdowski
> News: https://twitter.com/ZdharmaI
> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
> Blog: http://zdharma.org
>
-- 
Duy
Sebastian Gniazdowski· Jan 28, 2019, 05:24 UTC · re: Duy Nguyen · lore

Re: There should be a `.gitbless; file, protecting files from git clean

On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:
Show 13 quoted lines
> On Mon, Jan 28, 2019 at 9:54 AM Sebastian Gniazdowski
> wrote:
> >
> > Hello,
> > Could a .gitbless file be a solution? I would list in it, e.g.:
> >
> > TODO
> >
> > and this way be able to use `git -dxf' again. What do you think?
> 
> There's a patch that adds "precious" git attribute [1]. I was going to
> resend once the backup-log [2] got reviewed but I might just send it
> separately to handle the "git clean" case alone.
That would be nice solution. In the email, you ask for a name other than "precious". So maybe "blessed"?
-- 
Sebastian Gniazdowski 
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Duy Nguyen· Jan 29, 2019, 00:48 UTC · re: Sebastian Gniazdowski · lore

Re: There should be a `.gitbless; file, protecting files from git clean

On Mon, Jan 28, 2019 at 12:24 PM Sebastian Gniazdowski <psprint@zdharma.org> wrote:

Show 17 quoted lines
>
> On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:
> > On Mon, Jan 28, 2019 at 9:54 AM Sebastian Gniazdowski
> > wrote:
> > >
> > > Hello,
> > > Could a .gitbless file be a solution? I would list in it, e.g.:
> > >
> > > TODO
> > >
> > > and this way be able to use `git -dxf' again. What do you think?
> >
> > There's a patch that adds "precious" git attribute [1]. I was going to
> > resend once the backup-log [2] got reviewed but I might just send it
> > separately to handle the "git clean" case alone.
>
> That would be nice solution. In the email, you ask for a name other than "precious". So maybe "blessed"?

There's a couple mail replies in that thread that pointed out "precious" has been used elsewhere (I think Makefile is one) so I think I'm going to stick with "precious". Besides it sounds "precious" :D

-- 
Duy
Sebastian Gniazdowski· Jan 28, 2019, 06:23 UTC · re: Duy Nguyen · lore

Re: There should be a `.gitbless; file, protecting files from git clean

I like the idea of the backup-log, I hope it gets commited!
On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:
Show 20 quoted lines
> 
> There's a patch that adds "precious" git attribute [1]. I was going to
> resend once the backup-log [2] got reviewed but I might just send it
> separately to handle the "git clean" case alone.
> 
> [1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/ 
> [2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/ 
> 
> >
> > --
> > Sebastian Gniazdowski
> > News: https://twitter.com/ZdharmaI
> > IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
> > Blog: http://zdharma.org
> >
> 
> 
> --
> Duy
> 
-- 
Sebastian Gniazdowski 
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Sebastian Gniazdowski· Jan 28, 2019, 15:30 UTC · re: Duy Nguyen · lore

Re: There should be a `.gitbless; file, protecting files from git clean

On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:
Show 6 quoted lines
> There's a patch that adds "precious" git attribute [1]. I was going to
> resend once the backup-log [2] got reviewed but I might just send it
> separately to handle the "git clean" case alone.
> 
> [1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/ 
> [2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/ 
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?
-- 
Sebastian Gniazdowski 
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Duy Nguyen· Jan 29, 2019, 01:00 UTC · re: Sebastian Gniazdowski · lore

Re: There should be a `.gitbless; file, protecting files from git clean

On Mon, Jan 28, 2019 at 10:30 PM Sebastian Gniazdowski <psprint@zdharma.org> wrote:

Show 13 quoted lines
>
>
>
> On 28 stycznia 2019 at 06:05:31, Duy Nguyen (pclouds@gmail.com) wrote:
> > There's a patch that adds "precious" git attribute [1]. I was going to
> > resend once the backup-log [2] got reviewed but I might just send it
> > separately to handle the "git clean" case alone.
> >
> > [1] https://public-inbox.org/git/20181111095254.30473-1-pclouds@gmail.com/
> > [2] https://public-inbox.org/git/20181209104419.12639-1-pclouds@gmail.com/
>
>
> 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?

backup-log already saves untracked files for "git reset --hard" support if I remember correctly. Adding support for "git clean" is not that big a deal. It's just the matter whether to turn it on by default (because there will be a lot of files being backed up). But now that I think about it, if backup log is enabled, perhaps we allow "git clean -dx" (without -f or -i) which will back up all deleted files, while -fdx will not. Hmm...

-- 
Duy
Junio C Hamano· Jan 28, 2019, 18:08 UTC · re: Duy Nguyen · lore

Re: There should be a `.gitbless; file, protecting files from git clean

Duy Nguyen <pclouds@gmail.com> writes:
> There's a patch that adds "precious" git attribute [1]. I was going to
> resend once the backup-log [2] got reviewed but I might just send it
> separately to handle the "git clean" case alone.
Thanks.

← back to recent threads