1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-23 09:06:35 +02:00

reset: add new reset.quiet config setting

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ben Peart 2018-10-23 15:04:22 -04:00 committed by Junio C Hamano
parent 9ac8125d1a
commit 4c3abd0551
3 changed files with 8 additions and 1 deletions

View File

@ -2753,6 +2753,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.
include::sendemail-config.txt[]
sequence.editor::

View File

@ -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.
EXAMPLES

View File

@ -307,6 +307,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);