Re: [PATCH v2 2/3] reset: add new reset.quiet config setting
- From
Ben Peart <peartben@gmail.com>
- Date
- Oct 19, 2018, 17:11 UTC
- Message-ID
- <5594e9d0-cfe2-f29f-a788-bebbd8d2b151@gmail.com>
- In-Reply-To
- <20181019164631.GB24740@sigill.intra.peff.net>
On 10/19/2018 12:46 PM, Jeff King wrote:
Show 26 quoted lines
> On Fri, Oct 19, 2018 at 12:36:44PM -0400, Eric Sunshine wrote: > >> On Fri, Oct 19, 2018 at 12:12 PM Ben Peart <peartben@gmail.com> wrote: >>> 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> >>> --- >>> diff --git a/Documentation/config.txt b/Documentation/config.txt >>> @@ -2728,6 +2728,9 @@ rerere.enabled:: >>> +reset.quiet:: >>> + When set to true, 'git reset' will default to the '--quiet' option. >> >> How does the user reverse this for a particular git-reset invocation? >> There is no --no-quiet or --verbose option. >> >> Perhaps you want to use OPT__VERBOSITY() instead of OPT__QUIET() in >> builtin/reset.c and document that --verbose overrides --quiet and >> reset.quiet (or something like that). > > I think OPT__QUIET() provides --no-quiet, since it's really an > OPT_COUNTUP() under the hood. Saying "--no-quiet" should reset it back > to 0. >
Thanks Peff. That is correct as confirmed by:
C:\Repos\VSO\src>git reset --no-quiet Unstaged changes after reset: M init.ps1
It took 6.74 seconds to enumerate unstaged changes after reset. You can use '--quiet' to avoid this. Set the config setting reset.quiet to true to make this the default.
> -Peff >