Re: [PATCH v2 2/2] clean: new option --exclude-from

2015-12-07 Thread Jeff King
On Sun, Dec 06, 2015 at 09:58:26AM -0500, James wrote: > +test_expect_success 'git clean -e --exclude-from' ' > + rm -fr repo && > + mkdir repo && > + cd repo && > + git init && > + touch known 1 2 3 && > + git add known && > + echo 1 >> .git/clean-exclude && > +

Re: [PATCH v2 2/2] clean: new option --exclude-from

2015-12-07 Thread Junio C Hamano
James writes: > +static int exclude_from_cb(const struct option *opt, > + const char *arg, int unset) > +{ > + struct dir_struct *dir = opt->value; > + add_excludes_from_file(dir, arg); I suspect this is wrong.

Re: [PATCH v2 2/2] clean: new option --exclude-from

2015-12-07 Thread Eric Sunshine
In addition to Peff's and Junio's review comments... On Sun, Dec 6, 2015 at 9:58 AM, James wrote: > From: James Rouzier > > Specify a file to read for exclude patterns. Missing Signed-off-by:. > --- > diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh > @@

[PATCH v2 2/2] clean: new option --exclude-from

2015-12-06 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| 60 + 3 files changed, 77 insertions(+), 3