From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Ben Peart <peartben@gmail.com>, git@vger.kernel.org
Cc: gitster@pobox.com, benpeart@microsoft.com, peff@peff.net,
sunshine@sunshineco.com
Subject: Re: [PATCH v4 2/3] reset: add new reset.quiet config setting
Date: Wed, 24 Oct 2018 01:39:32 +0100 [thread overview]
Message-ID: <3c31d5c3-df46-69e3-c138-30a93d9b3ce4@ramsayjones.plus.com> (raw)
In-Reply-To: <20181023190423.5772-3-peartben@gmail.com>
On 23/10/2018 20:04, Ben Peart wrote:
> From: Ben Peart <benpeart@microsoft.com>
Sorry for the late reply, ... I've been away from email - I am
still trying to catch up.
>
> Add a reset.quiet config setting that sets the default value of the --quiet
> flag when running the reset command. This enables users to change the
> default behavior to take advantage of the performance advantages of
> avoiding the scan for unstaged changes after reset. Defaults to false.
>
> Signed-off-by: Ben Peart <benpeart@microsoft.com>
> ---
> Documentation/config.txt | 3 +++
> Documentation/git-reset.txt | 5 ++++-
> builtin/reset.c | 1 +
> 3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index f6f4c21a54..a2d1b8b116 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -2728,6 +2728,9 @@ rerere.enabled::
> `$GIT_DIR`, e.g. if "rerere" was previously used in the
> repository.
>
> +reset.quiet::
> + When set to true, 'git reset' will default to the '--quiet' option.
Mention that this 'Defaults to false'?
> +
> include::sendemail-config.txt[]
>
> sequence.editor::
> diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
> index 1d697d9962..2dac95c71a 100644
> --- a/Documentation/git-reset.txt
> +++ b/Documentation/git-reset.txt
> @@ -95,7 +95,10 @@ OPTIONS
>
> -q::
> --quiet::
> - Be quiet, only report errors.
> +--no-quiet::
> + Be quiet, only report errors. The default behavior is set by the
> + `reset.quiet` config option. `--quiet` and `--no-quiet` will
> + override the default behavior.
Better than last time, but how about something like:
-q::
--quiet::
--no-quiet::
Be quiet, only report errors. The default behaviour of the
command, which is to not be quiet, can be specified by the
`reset.quiet` configuration variable. The `--quiet` and
`--no-quiet` options can be used to override any configured
default.
Hmm, I am not sure that is any better! :-D
Also, note that the --no-option is often described separately to
the --option (in a separate paragraph). I don't know if that would
help here.
[The default behaviour is _not_ set by the configuration, if no
configuration is specified. :-P ]
Not sure if that helps!
ATB,
Ramsay Jones
>
>
> EXAMPLES
> diff --git a/builtin/reset.c b/builtin/reset.c
> index 04f0d9b4f5..3b43aee544 100644
> --- a/builtin/reset.c
> +++ b/builtin/reset.c
> @@ -306,6 +306,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
> };
>
> git_config(git_reset_config, NULL);
> + git_config_get_bool("reset.quiet", &quiet);
>
> argc = parse_options(argc, argv, prefix, options, git_reset_usage,
> PARSE_OPT_KEEP_DASHDASH);
>
next prev parent reply other threads:[~2018-10-24 3:07 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 16:40 [PATCH v1 0/2] speed up git reset Ben Peart
2018-10-17 16:40 ` [PATCH v1 1/2] reset: don't compute unstaged changes after reset when --quiet Ben Peart
2018-10-17 18:14 ` Eric Sunshine
2018-10-17 18:22 ` Jeff King
2018-10-18 3:40 ` Junio C Hamano
2018-10-18 6:36 ` Jeff King
2018-10-18 18:15 ` Ben Peart
2018-10-18 18:26 ` Duy Nguyen
2018-10-18 19:03 ` Ben Peart
2018-10-19 0:34 ` Junio C Hamano
2018-10-17 16:40 ` [PATCH v1 2/2] reset: add new reset.quietDefault config setting Ben Peart
2018-10-17 18:19 ` Eric Sunshine
2018-10-17 18:23 ` Jeff King
2018-10-23 9:13 ` Ævar Arnfjörð Bjarmason
2018-10-23 18:11 ` Ben Peart
2018-10-23 20:02 ` Jeff King
2018-10-23 20:03 ` Ævar Arnfjörð Bjarmason
2018-10-24 15:48 ` Recommended configurations (was Re: [PATCH v1 2/2] reset: add new reset.quietDefault config setting) Derrick Stolee
2018-10-24 23:58 ` Jeff King
2018-10-25 4:09 ` Junio C Hamano
2018-10-19 16:12 ` [PATCH v2 0/3] speed up git reset Ben Peart
2018-10-19 16:12 ` [PATCH v2 1/3] reset: don't compute unstaged changes after reset when --quiet Ben Peart
2018-10-19 16:12 ` [PATCH v2 2/3] reset: add new reset.quiet config setting Ben Peart
2018-10-19 16:36 ` Eric Sunshine
2018-10-19 16:46 ` Jeff King
2018-10-19 17:10 ` Eric Sunshine
2018-10-19 17:11 ` Jeff King
2018-10-19 17:23 ` Ben Peart
2018-10-19 19:08 ` Jeff King
2018-10-22 5:04 ` Junio C Hamano
2018-10-19 17:11 ` Ben Peart
2018-10-19 16:12 ` [PATCH v2 3/3] reset: warn when refresh_index() takes more than 2 seconds Ben Peart
2018-10-22 13:18 ` [PATCH v3 0/3] speed up git reset Ben Peart
2018-10-22 13:18 ` [PATCH v3 1/3] reset: don't compute unstaged changes after reset when --quiet Ben Peart
2018-10-22 20:44 ` Johannes Schindelin
2018-10-22 22:07 ` Ben Peart
2018-10-23 8:53 ` Johannes Schindelin
2018-10-23 15:46 ` Duy Nguyen
2018-10-23 19:55 ` Johannes Schindelin
2018-10-22 13:18 ` [PATCH v3 2/3] reset: add new reset.quiet config setting Ben Peart
2018-10-22 14:45 ` Duy Nguyen
2018-10-23 18:47 ` Ben Peart
2018-10-24 2:56 ` Junio C Hamano
2018-10-24 7:21 ` Junio C Hamano
2018-10-24 14:54 ` Duy Nguyen
2018-10-25 1:12 ` Junio C Hamano
2018-10-24 14:49 ` Duy Nguyen
2018-10-22 19:13 ` Ramsay Jones
2018-10-22 20:06 ` Jeff King
2018-10-23 17:31 ` Ben Peart
2018-10-23 17:35 ` Jeff King
2018-10-22 13:18 ` [PATCH v3 3/3] reset: warn when refresh_index() takes more than 2 seconds Ben Peart
2018-10-23 0:23 ` Junio C Hamano
2018-10-23 17:12 ` Ben Peart
2018-10-23 19:04 ` [PATCH v4 0/3] speed up git reset Ben Peart
2018-10-23 19:04 ` [PATCH v4 1/3] reset: don't compute unstaged changes after reset when --quiet Ben Peart
2018-10-23 19:04 ` [PATCH v4 2/3] reset: add new reset.quiet config setting Ben Peart
2018-10-24 0:39 ` Ramsay Jones [this message]
2018-10-25 4:56 ` Junio C Hamano
2018-10-25 9:26 ` Junio C Hamano
2018-10-25 13:26 ` Ben Peart
2018-10-25 17:04 ` Ramsay Jones
2018-10-23 19:04 ` [PATCH v4 3/3] reset: warn when refresh_index() takes more than 2 seconds Ben Peart
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=3c31d5c3-df46-69e3-c138-30a93d9b3ce4@ramsayjones.plus.com \
--to=ramsay@ramsayjones.plus.com \
--cc=benpeart@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peartben@gmail.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.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).