Re: [PATCH] clean: new option --exclude-from

2015-12-07 Thread Jeff King
On Sat, Dec 05, 2015 at 07:51:03PM -0800, Junio C Hamano wrote: > In any case, what we've been discussing may be an interesting and > potentially important tangent, but it still is a tangent while > evaluating the patch in question. I do not think I'd be using the > new "--exclude-from=" option t

Re: [PATCH] clean: new option --exclude-from

2015-12-05 Thread Junio C Hamano
Jeff King writes: > My motivation isn't exactly code sharing. It is that you sometimes want > to affect sub-commands of a program, and cannot pass command line > options to them yourself. > > For instance, "git-stash --include-untracked" will call "git clean" > under the hood. There is no way to

Re: [PATCH] clean: new option --exclude-from

2015-12-02 Thread Jeff King
On Wed, Dec 02, 2015 at 09:25:24AM -0800, Junio C Hamano wrote: > I do not think we should liberally add options that apply to > anything "git" in the first place [*1*]. Limit them to ones that > are really special and fundamental that changes the way Git > operates, i.e. "Where is our $GIT_DIR?"

Re: [PATCH] clean: new option --exclude-from

2015-12-02 Thread Junio C Hamano
Jeff King writes: > So maybe "clean" is really the only place where people care > about such ad-hoc exclusion. Or maybe this an opportunity to add: > > git --exclude='*.o' clean > > I dunno. I cannot think of a time when I would have used any of those > options myself. Me either and I do

Re: [PATCH] clean: new option --exclude-from

2015-12-02 Thread Jeff King
On Wed, Dec 02, 2015 at 08:40:05AM -0800, Junio C Hamano wrote: > But for this particular one, I viewed the topic as adding a new > option as a shorter way for passing multiple -e options on > the command line. When viewed that way, even if core.excludesfile > were multi-valued, I wouldn't have

Re: [PATCH] clean: new option --exclude-from

2015-12-02 Thread Junio C Hamano
Jeff King writes: > On Tue, Dec 01, 2015 at 06:18:30PM -0800, Junio C Hamano wrote: > >> It is likely that existing users are already using $HOME/.gitconfig >> that sets core.excludesfile=$HOME/.gitconfig as the personal >> fallback, that is overriden, not tweaked, by project specific >> settings

Re: [PATCH] clean: new option --exclude-from

2015-12-01 Thread Jeff King
On Tue, Dec 01, 2015 at 06:18:30PM -0800, Junio C Hamano wrote: > > Should this perhaps be an option to the main "git" to append to the set > > of excludes? > > > > You can kind-of do this already with: > > > > git -c core.excludesfile=/path/to/whatever clean ... > > > > but of course you might

Re: [PATCH] clean: new option --exclude-from

2015-12-01 Thread Junio C Hamano
Jeff King writes: > On Thu, Nov 26, 2015 at 09:44:25AM -0500, James wrote: > >> From: James Rouzier >> >> Specify a file to read for exclude patterns. >> --- > > Lots of commands care about excludes (e.g., "add", "status"). > > Should this perhaps be an option to the main "git" to append to the

Re: [PATCH] clean: new option --exclude-from

2015-12-01 Thread Jeff King
On Thu, Nov 26, 2015 at 09:44:25AM -0500, James wrote: > From: James Rouzier > > Specify a file to read for exclude patterns. > --- Lots of commands care about excludes (e.g., "add", "status"). Should this perhaps be an option to the main "git" to append to the set of excludes? You can kind-o

Re: [PATCH] clean: new option --exclude-from

2015-12-01 Thread Eric Sunshine
On Tue, Dec 1, 2015 at 4:36 PM, James Rouzier wrote: > Eric thank you for the feedback. [re-adding git@vger.kernel.org to recipient list since this response was likely intended to be public] > On Sun, Nov 29, 2015 at 9:24 PM, Eric Sunshine > wrote: >> On Thu, Nov 26, 2015 at 9:44 AM, James wro

Re: [PATCH] clean: new option --exclude-from

2015-11-29 Thread Eric Sunshine
On Thu, Nov 26, 2015 at 9:44 AM, James wrote: > From: James Rouzier > > Specify a file to read for exclude patterns. > --- > diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt > @@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree > SYNOPSIS > >

[PATCH] clean: new option --exclude-from

2015-11-26 Thread James
From: James Rouzier Specify a file to read for exclude patterns. --- Documentation/git-clean.txt | 5 - builtin/clean.c | 15 ++- t/t7300-clean.sh| 35 +++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/Doc