зеркало из https://github.com/microsoft/git.git
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:
Родитель
9ac8125d1a
Коммит
4c3abd0551
|
@ -2753,6 +2753,9 @@ rerere.enabled::
|
||||||
`$GIT_DIR`, e.g. if "rerere" was previously used in the
|
`$GIT_DIR`, e.g. if "rerere" was previously used in the
|
||||||
repository.
|
repository.
|
||||||
|
|
||||||
|
reset.quiet::
|
||||||
|
When set to true, 'git reset' will default to the '--quiet' option.
|
||||||
|
|
||||||
include::sendemail-config.txt[]
|
include::sendemail-config.txt[]
|
||||||
|
|
||||||
sequence.editor::
|
sequence.editor::
|
||||||
|
|
|
@ -95,7 +95,10 @@ OPTIONS
|
||||||
|
|
||||||
-q::
|
-q::
|
||||||
--quiet::
|
--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
|
EXAMPLES
|
||||||
|
|
|
@ -307,6 +307,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
|
||||||
};
|
};
|
||||||
|
|
||||||
git_config(git_reset_config, NULL);
|
git_config(git_reset_config, NULL);
|
||||||
|
git_config_get_bool("reset.quiet", &quiet);
|
||||||
|
|
||||||
argc = parse_options(argc, argv, prefix, options, git_reset_usage,
|
argc = parse_options(argc, argv, prefix, options, git_reset_usage,
|
||||||
PARSE_OPT_KEEP_DASHDASH);
|
PARSE_OPT_KEEP_DASHDASH);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче