diff options
author | Victoria Dye <vdye@github.com> | 2022-03-23 21:17:58 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-24 00:39:44 +0300 |
commit | 45bf76284b40856e47e8809e952167f0316b8a99 (patch) | |
tree | d9f3716ebcd9163c959255b0485dfa9e7714b9ea /builtin | |
parent | 4b8b0f6fa2778c1f9c373620e3f07787543914c6 (diff) |
reset: do not make '--quiet' disable index refresh
Update '--quiet' to no longer implicitly skip refreshing the index in a
mixed reset. Users now have the ability to explicitly disable refreshing the
index with the '--no-refresh' option, so they no longer need to use
'--quiet' to do so. Moreover, we explicitly remove the refresh-skipping
behavior from '--quiet' because it is completely unrelated to the stated
purpose of the option: "Be quiet, only report errors."
Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/reset.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/builtin/reset.c b/builtin/reset.c index c8a356ec5b..1804d0eeb8 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -392,7 +392,7 @@ static int git_reset_config(const char *var, const char *value, void *cb) int cmd_reset(int argc, const char **argv, const char *prefix) { int reset_type = NONE, update_ref_status = 0, quiet = 0; - int refresh = -1; + int refresh = 1; int patch_mode = 0, pathspec_file_nul = 0, unborn; const char *rev, *pathspec_from_file = NULL; struct object_id oid; @@ -430,13 +430,6 @@ int cmd_reset(int argc, const char **argv, const char *prefix) PARSE_OPT_KEEP_DASHDASH); parse_args(&pathspec, argv, prefix, patch_mode, &rev); - /* - * If refresh is completely unspecified (either by config or by command - * line option), decide based on 'quiet'. - */ - if (refresh < 0) - refresh = !quiet; - if (pathspec_from_file) { if (patch_mode) die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--patch"); |