[PATCH/RFC] clean: add a flag to back up cleaned files

2014-05-27 Thread Erik Faye-Lund
The combination of git clean and fat fingers can some times cause data-loss, which can be frustrating. So let's add a flag that imports the files to be deleted into the object-database, in a way similar to what git-stash does. Maintain a reflog of the previously backed up clean-runs.

Re: [PATCH/RFC] clean: add a flag to back up cleaned files

2014-05-27 Thread Jeff King
On Tue, May 27, 2014 at 04:17:34PM +0200, Erik Faye-Lund wrote: The combination of git clean and fat fingers can some times cause data-loss, which can be frustrating. So let's add a flag that imports the files to be deleted into the object-database, in a way similar to what git-stash does.

Re: [PATCH/RFC] clean: add a flag to back up cleaned files

2014-05-27 Thread Erik Faye-Lund
On Tue, May 27, 2014 at 6:37 PM, Jeff King p...@peff.net wrote: On Tue, May 27, 2014 at 04:17:34PM +0200, Erik Faye-Lund wrote: The combination of git clean and fat fingers can some times cause data-loss, which can be frustrating. So let's add a flag that imports the files to be deleted into

Re: [PATCH/RFC] clean: add a flag to back up cleaned files

2014-05-27 Thread Jeff King
On Tue, May 27, 2014 at 08:12:52PM +0200, Erik Faye-Lund wrote: I've definitely considered doing something like this before (and for git reset --hard). My biggest concern would be poor performance in some cases. But since it's optional, and one can presumably override it with --no-backup