From: Junio C Hamano <gitster@pobox.com>
To: Jared Hance <jaredhance@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] Add --exclude to git-clean.
Date: Mon, 19 Jul 2010 10:43:43 -0700 [thread overview]
Message-ID: <7vbpa3pdtc.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <bf4ea4e83162ebf1d915b87413aad54a1162a637.1279556172.git.jaredhance@gmail.com> (Jared Hance's message of "Mon\, 19 Jul 2010 12\:18\:08 -0400")
Jared Hance <jaredhance@gmail.com> writes:
> diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
> index a81cb6c..2bf9cf2 100644
> --- a/Documentation/git-clean.txt
> +++ b/Documentation/git-clean.txt
> @@ -8,7 +8,7 @@ git-clean - Remove untracked files from the working tree
> SYNOPSIS
> --------
> [verse]
> -'git clean' [-d] [-f] [-n] [-q] [-x | -X] [--] <path>...
> +'git clean' [-d] [-f] [-n] [-q] [-e] [-x | -X] [--] <path>...
This and ...
> DESCRIPTION
> -----------
> @@ -45,6 +45,10 @@ OPTIONS
> Be quiet, only report errors, but not the files that are
> successfully removed.
>
> +-e::
> +--exclude::
this both look wrong. They do not tell the readers that the option takes
a mandatory argument that specifies the "exceptions". Worse yet,
> + Specify special exceptions to not be cleaned. Separate with colon.
this does not tell _how_ exceptions are specified.
What should each element on the list look like?
Is it a dot-suffix without dot (e.g. "html") or with dot (e.g. ".html")?
Or is it a glob (e.g. "*.html")? Or is it a full path relative to the
worktree root (e.g. "Documentation/index.html")?
Using colon as an inter-element separator makes sense only if last one is
true (i.e. "concrete path, not glob nor suffix"), so an intelligent reader
could probably guess what you meant, but you shouldn't make readers guess
in the first place.
If on the other hand you wanted to allow specifying the same kind of
patterns used in the gitignore files from the command line:
(1) A list separated with whitespace would be more natural, not a colon;
and
(2) I have to wonder why do we give such a command line exclude override
to begin with.
(2-a) wouldn't it be easier for the user to add such a local
configuration to $GIT_DIR/info/exclude once and be done with
it?
(2-b) if command-line override has benefit, why is it limited to only
_exclude_ and not include (iow, additional ignore patterns)?
next prev parent reply other threads:[~2010-07-19 17:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-19 15:50 [PATCH] Add --exclude to git-clean.j Jared Hance
2010-07-19 16:14 ` Jonathan Nieder
2010-07-19 16:21 ` Jared Hance
2010-07-19 16:18 ` [PATCH v2] Add --exclude to git-clean Jared Hance
2010-07-19 17:43 ` Junio C Hamano [this message]
2010-07-19 18:22 ` Jared Hance
2010-07-19 18:39 ` [PATCH v3] " Jared Hance
2010-07-20 16:28 ` [PATCH/RFC v4 0/2] Add -e/--exclude to git clean Jared Hance
2010-07-20 16:29 ` [PATCH/RFC v4 1/2] Add --exclude to git-clean Jared Hance
2010-07-20 16:30 ` [PATCH 2/2] Add test for git clean -e Jared Hance
2010-07-20 17:03 ` [PATCH/RFC v4 0/2] Add -e/--exclude to git clean Aaron Crane
2010-07-20 17:13 ` Jared Hance
2010-07-20 18:02 ` Junio C Hamano
2010-07-20 18:23 ` Junio C Hamano
2010-07-20 19:11 ` Jared Hance
2010-09-23 9:05 ` Louis Strous
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vbpa3pdtc.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jaredhance@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).