From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Rast Subject: Re: Re* git clean --exclude broken? Date: Fri, 26 Aug 2011 12:00:25 +0200 Message-ID: <201108261200.25792.trast@student.ethz.ch> References: <7vfwkqmfsh.fsf@alter.siamese.dyndns.org> <7vpqjtl4yi.fsf_-_@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: , Todd Rinaldo To: Junio C Hamano X-From: git-owner@vger.kernel.org Fri Aug 26 12:00:34 2011 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QwtDF-00074a-UJ for gcvg-git-2@lo.gmane.org; Fri, 26 Aug 2011 12:00:34 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754680Ab1HZKA2 (ORCPT ); Fri, 26 Aug 2011 06:00:28 -0400 Received: from edge20.ethz.ch ([82.130.99.26]:12542 "EHLO edge20.ethz.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752803Ab1HZKA1 (ORCPT ); Fri, 26 Aug 2011 06:00:27 -0400 Received: from CAS22.d.ethz.ch (172.31.51.112) by edge20.ethz.ch (82.130.99.26) with Microsoft SMTP Server (TLS) id 14.1.289.1; Fri, 26 Aug 2011 12:00:24 +0200 Received: from thomas.inf.ethz.ch (129.132.153.233) by CAS22.d.ethz.ch (172.31.51.112) with Microsoft SMTP Server (TLS) id 14.1.289.1; Fri, 26 Aug 2011 12:00:25 +0200 User-Agent: KMail/1.13.7 (Linux/3.0.3-41-desktop; KDE/4.6.5; x86_64; ; ) In-Reply-To: <7vpqjtl4yi.fsf_-_@alter.siamese.dyndns.org> X-Originating-IP: [129.132.153.233] Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Junio C Hamano wrote: > Junio C Hamano 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 " 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 ", PARSE_OPT_NONEG, exclude_cb }, + "add 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