Re: [PATCH v2 2/2] clean: new option --exclude-from
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 7, 2015, 21:44 UTC
- Message-ID
- <xmqq1taylyr8.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1449413906-23256-2-git-send-email-rouzier@gmail.com>
James <rouzier@gmail.com> writes:
Show 5 quoted lines
> +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. add_excludes_from_file() creates a new excludes_list that is separate from the command line level and pushes that down to the exclude stack. You'd instead need to add each line of the input at the same EXC_CMDL level like -e <pattern> option does from the command line, I would think.