Skip to contentSkip to conversation

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

DISCUSSION Sebastian Gniazdowski 3 participants 8 messages Jan 28, 2019 – Jan 29, 2019

lore
Share & tools
lore
#0 lore raw

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?

Signature · 4 lines
Sebastian Gniazdowski 
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
#1 lore raw
Quoted 9 lines · Sebastian Gniazdowski

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/[email protected]/
[2] https://public-inbox.org/git/[email protected]/

Quoted 7 lines

--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

Signature · 1 line
Duy
#2 lore raw
Quoted 6 lines · Duy Nguyen
Quoted 4 lines · Sebastian Gniazdowski

Hello,
Could a .gitbless file be a solution? I would list in it, e.g.:

Quoted 7 lines
Quoted 3 lines

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"?

Signature · 4 lines
Sebastian Gniazdowski 
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
#3 lore raw
Quoted 10 lines · Sebastian Gniazdowski
Quoted 8 lines · Duy Nguyen
Quoted 6 lines · Sebastian Gniazdowski

Hello,
Could a .gitbless file be a solution? I would list in it, e.g.:

TODO

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

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

Signature · 1 line
Duy
#4 lore raw
In reply to Duy Nguyen

I like the idea of the backup-log, I hope it gets commited!

Quoted 20 lines · Duy Nguyen

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/[email protected]/
[2] https://public-inbox.org/git/[email protected]/

Quoted 7 lines

--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

--
Duy

Signature · 4 lines
Sebastian Gniazdowski 
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
#5 lore raw
In reply to Duy Nguyen
Quoted 6 lines · Duy Nguyen

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/[email protected]/
[2] https://public-inbox.org/git/[email protected]/

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?

Signature · 4 lines
Sebastian Gniazdowski 
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
#6 lore raw
Quoted 8 lines · Sebastian Gniazdowski
Quoted 4 lines · Duy Nguyen

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.

Quoted 5 lines
Quoted 2 lines

[1] https://public-inbox.org/git/[email protected]/
[2] https://public-inbox.org/git/[email protected]/

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

Signature · 1 line
Duy
#7 lore raw
In reply to Duy Nguyen
Quoted 3 lines · Duy Nguyen

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.