Junio C Hamano wrote: > Junio C Hamano <gitster@xxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html