From: Junio C Hamano <gitster@pobox.com>
To: Simon Hausmann <simon@lst.de>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH 2/3] Introduce core.showUntrackedFiles to make it possible to disable showing of untracked files.
Date: Fri, 30 May 2008 13:27:57 -0700 [thread overview]
Message-ID: <7viqwvk04y.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 3088e5a9507aa55ee55f512fb3bd554f1658d2e3.1212152269.git.marius@trolltech.com
Simon Hausmann <simon@lst.de> writes:
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 5331b45..e42ead0 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -214,6 +214,11 @@ core.ignoreStat::
> See linkgit:git-update-index[1].
> False by default.
>
> +core.showUntrackedFiles::
> + A boolean to enable/disable displaying untracked files in the output
> + of linkgit:git-status[1] and linkgit:git-commit[1].
> + Defaults to true.
> +
This does not belong to the 'core.*', which is about the low-level
plumbing. It perhaps could live in 'status.*' section, but I think you
can do better than introducing this as a boolean.
> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
> index c3c9f5b..a3174e4 100644
> --- a/Documentation/git-commit.txt
> +++ b/Documentation/git-commit.txt
> @@ -150,12 +150,17 @@ but can be used to amend a merge commit.
> the last commit without committing changes that have
> already been staged.
>
> +-U|--untracked::
> + Show untracked files, in the "Untracked files:" section of commit
> + message template.
> + This option overrides the core.showUntrackedFiles
> + configuration option, and is normally not needed.
> +
> -u|--untracked-files::
> Show all untracked files, also those in uninteresting
> - directories, in the "Untracked files:" section of commit
> - message template. Without this option only its name and
> + directories. Without this option only its name and
> a trailing slash are displayed for each untracked
> - directory.
> + directory. This option implies --untracked.
I wonder if we really need a new option that is half independent to an
existing one.
Step back a bit and think. You have three choice:
(1) Do not show untracked files at all; or
(2) Show untracked but summarize untracked directories; or
(3) Show all untracked files.
We have had (2) and (3) so far, and you are adding (1) as a new feature.
How about allowing -u on the command line to take an optional parameter to
say what kind the user wants? I.e.
-u=none shows nothing (i.e. (1))
-u=normal shows summarized report (i.e. (2))
-u=all shows all untracked files (i.e. (3))
And (3) can also be spelled as "-u without parameter"; absense of -u
anywhere defaults to (2). That would be the first patch.
Then, in the second patch, you can add support to 'status.showuntracked';
you pretend that it is set to 'normal' if it is not defined in the
configuration file.
Hmm?
next prev parent reply other threads:[~2008-05-30 20:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 9:29 [PATCH] Ensure that commit/status don't stat all files when core.ignoreStat = true Marius Storm-Olsen
2008-05-27 20:00 ` Junio C Hamano
2008-05-27 20:21 ` Marius Storm-Olsen
2008-05-30 11:14 ` [PATCH 1/3] Clearify the documentation for core.ignoreStat Marius Storm-Olsen
2008-05-30 8:54 ` [PATCH 2/3] Introduce core.showUntrackedFiles to make it possible to disable showing of untracked files Simon Hausmann
2008-05-30 12:38 ` [PATCH 3/3] Add shortcut in refresh_cache_ent() for marked entries Marius Storm-Olsen
2008-05-30 13:14 ` Marius Storm-Olsen
2008-05-30 13:10 ` [PATCH 2/3] Introduce core.showUntrackedFiles to make it possible to disable showing of untracked files Marius Storm-Olsen
2008-05-30 13:16 ` Marius Storm-Olsen
2008-05-30 20:27 ` Junio C Hamano [this message]
2008-05-31 6:41 ` Marius Storm-Olsen
2008-06-03 13:09 ` [PATCH] Add an optional <mode> argument to commit/status -u|--untracked-files option Marius Storm-Olsen
2008-06-03 13:12 ` [PATCH] Add configuration option for default untracked files mode Marius Storm-Olsen
2008-06-03 20:02 ` [PATCH] Add an optional <mode> argument to commit/status -u|--untracked-files option Junio C Hamano
2008-06-03 21:00 ` Marius Storm-Olsen
2008-06-05 8:31 ` [PATCH 1/3] " Marius Storm-Olsen
2008-06-05 12:22 ` [PATCH 2/3] Add argument 'no' commit/status option -u|--untracked-files Marius Storm-Olsen
2008-06-05 12:47 ` [PATCH 3/3] Add configuration option for default untracked files mode Marius Storm-Olsen
2008-06-07 1:55 ` [PATCH 1/3] Add an optional <mode> argument to commit/status -u|--untracked-files option Junio C Hamano
2008-06-09 6:54 ` Marius Storm-Olsen
2008-06-05 8:31 ` Marius Storm-Olsen
2008-06-05 12:22 ` [PATCH 2/3] Add argument 'no' commit/status option -u|--untracked-files Marius Storm-Olsen
2008-06-05 12:47 ` [PATCH 3/3] Add configuration option for default untracked files mode Marius Storm-Olsen
2008-06-10 6:23 ` [PATCH 1/3] Add an optional <mode> argument to commit/status -u|--untracked-files option Junio C Hamano
2008-06-03 20:14 ` [PATCH] " Jeff King
2008-06-03 21:17 ` Marius Storm-Olsen
2008-06-03 22:27 ` Jeff King
2008-06-03 22:26 ` しらいしななこ
[not found] ` <200806032227.m53MRLeD005668@mi0.bluebottle.com>
2008-06-03 22:53 ` Jeff King
2008-06-06 6:32 ` Alex Riesen
2008-06-06 6:56 ` Marius Storm-Olsen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7viqwvk04y.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=simon@lst.de \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).