Re: Re* git clean --exclude broken?
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Aug 26, 2011, 10:00 UTC
- Message-ID
- <201108261200.25792.trast@student.ethz.ch>
- In-Reply-To
- <7vpqjtl4yi.fsf_-_@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 13 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > > > The documentation and the implementation of "git clean" is quite confused. > > ... > > So here is a patch to fix the confusion. > > It does not add a new "--except=C" I alluded to, but at least it should > be the right first step to make the document clearly describe what the > existing option does. > > -- >8 -- > Subject: [PATCH] Documentation: clarify "git clean -e <pattern>"
It's not exclusively a doc patch, is it?
> + if (ignored && exclude_list.nr)
> + die(_("adding exclude with -e and ignoring it with -x is crazy"));Please also add something like the following patch, so that 'git clean -h' does not confuse the user either.
diff --git i/builtin/clean.c w/builtin/clean.c index 75697f7..33a3df9 100644 --- i/builtin/clean.c +++ w/builtin/clean.c @@ -54,7 +54,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix) OPT_BOOLEAN('d', NULL, &remove_directories, "remove whole directories"), { OPTION_CALLBACK, 'e', "exclude", &exclude_list, "pattern", - "exclude <pattern>", PARSE_OPT_NONEG, exclude_cb }, + "add <pattern> to ignore rules", PARSE_OPT_NONEG, exclude_cb }, OPT_BOOLEAN('x', NULL, &ignored, "remove ignored files, too"), OPT_BOOLEAN('X', NULL, &ignored_only, "remove only ignored files"),
--
Thomas Rast
trast@{inf,student}.ethz.ch