Re: [RFC] git clean --local

2018-12-03 Thread Junio C Hamano
Junio C Hamano writes: > If "git clean" takes a pathspec, perhaps you can give a negative > pathspec to exclude whatever you do not want to get cleaned, > something like > > git clean '*.o' ':!precious.o' > > to say "presious.o is ignored (hence normally expendable), but I do > not want to

Re: [RFC] git clean --local

2018-12-02 Thread Cameron Boehmer
> > Would something like git clean --exclude=file-pattern work as a > > compromise notion? Files matching the pattern would not be cleaned > > regardless of .gitignore or their potential preciousness status > > long-term. Multiple repetitions of the --exclude option might be > > supportable. I

Re: [RFC] git clean --local

2018-12-02 Thread Junio C Hamano
"Randall S. Becker" writes: > Would something like git clean --exclude=file-pattern work as a > compromise notion? Files matching the pattern would not be cleaned > regardless of .gitignore or their potential preciousness status > long-term. Multiple repetitions of the --exclude option might be

RE: [RFC] git clean --local

2018-12-02 Thread Randall S. Becker
On December 2, 2018 8:26, Ævar Arnfjörð Bjarmason wrote: > > On Sat, Dec 01 2018, Cameron Boehmer wrote: > > > 1) add a new flag > > -l, --local > > Do not consult git config --global core.excludesFile in > > determining what files git ignores. This is useful in conjunction with > > -x/-X to

Re: [RFC] git clean --local

2018-12-02 Thread Ævar Arnfjörð Bjarmason
On Sat, Dec 01 2018, Cameron Boehmer wrote: > 1) add a new flag > -l, --local > Do not consult git config --global core.excludesFile in > determining what files git ignores. This is useful in conjunction with > -x/-X to preserve user files while removing build artifacts. Or perhaps a

Re: [RFC] git clean --local

2018-12-01 Thread Junio C Hamano
Junio C Hamano writes: > Cameron Boehmer writes: > >> 1) add a new flag >> -l, --local >> Do not consult git config --global core.excludesFile in >> determining what files git ignores. This is useful in conjunction with >> -x/-X to preserve user files while removing build artifacts. > ... >

Re: [RFC] git clean --local

2018-12-01 Thread Junio C Hamano
Cameron Boehmer writes: > 1) add a new flag > -l, --local > Do not consult git config --global core.excludesFile in > determining what files git ignores. This is useful in conjunction with > -x/-X to preserve user files while removing build artifacts. This does not belong to the "clean"

[RFC] git clean --local

2018-12-01 Thread Cameron Boehmer
-x and -X are great, but they remove files that are ignored via my ~/.gitignore that I'd rather keep (personal toolchain dotfiles). If others also would like to see this addressed and we settle on a specific solution, I'd be happy to submit a patch. Some ideas: 1) add a new flag -l, --local