Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictoria Dye <vdye@github.com>2022-03-23 21:17:58 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-24 00:39:44 +0300
commit45bf76284b40856e47e8809e952167f0316b8a99 (patch)
treed9f3716ebcd9163c959255b0485dfa9e7714b9ea /builtin
parent4b8b0f6fa2778c1f9c373620e3f07787543914c6 (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.c9
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");