All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Victoria Dye via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, phillip.wood123@gmail.com,
	Victoria Dye <vdye@github.com>
Subject: [PATCH 0/4] reset: make --no-refresh the only way to skip index refresh
Date: Mon, 21 Mar 2022 20:34:45 +0000	[thread overview]
Message-ID: <pull.1184.git.1647894889.gitgitgadget@gmail.com> (raw)

Maintainer's note: this is based on vd/stash-silence-reset

----------------------------------------------------------------------------

This is a follow-up to the changes in vd/stash-silence-reset [1], in which
index refreshing behavior was decoupled from log silencing in the '--quiet'
option to 'git reset --mixed' by introducing a '--[no-]refresh' option and
'reset.refresh' config setting.

After some discussion [2] on the mailing list, both the
backward-compatibility and use of global options in that series came into
question:

 * '--quiet' still skipped refresh if neither '--[no-]refresh' nor
   'reset.refresh' were specified, meaning that users could still be left
   with an incorrect index state after reset.
 * Having 'reset.quiet' and/or 'reset.refresh' potentially disable index
   refresh by default meant that developers would need to defensively add
   '--refresh' to all internal uses of 'git reset --mixed'. Without that
   option, different config setups could cause variability in index
   correctness from user to user.

In response, this series deprecates all instances of skipping index refresh
in 'git reset --mixed' except for '--no-refresh' itself:

 * Patch [1/4] removes the "fallback" behavior of 'reset.quiet' and
   '--quiet' implying '--no-refresh' if neither '--[no-]refresh' nor
   'config.refresh' were specified. In other words, '--quiet' no longer does
   anything other than log silencing.
 * Patch [2/4] deprecates 'reset.quiet', since its main use was to disable
   index refresh until it was deprecated in [1/4].
 * Patch [3/4] deprecates 'reset.refresh' to avoid users accidentally ending
   up with an incorrect index state after all resets as a result of a global
   setting's passive effects.
 * Patch [4/4] removes the '--refresh' option, leaving only '--no-refresh'.
   Because nothing but '--no-refresh' can skip the 'reset' index refresh
   anymore, '--refresh' would never be needed.

[1]
https://lore.kernel.org/git/pull.1170.v3.git.1647308982.gitgitgadget@gmail.com/
[2]
https://lore.kernel.org/git/80a2a5a2-256f-6c3b-2430-10bef99ce1e9@github.com/

Thanks! -Victoria

Victoria Dye (4):
  reset: do not make '--quiet' disable index refresh
  reset: deprecate 'reset.quiet' config option
  reset: deprecate 'reset.refresh' config option
  reset: deprecate '--refresh', leaving only '--no-refresh'

 Documentation/config.txt       |  2 --
 Documentation/config/reset.txt |  2 --
 Documentation/git-reset.txt    | 13 ++-------
 builtin/reset.c                | 18 +++----------
 builtin/stash.c                |  4 +--
 contrib/scalar/scalar.c        |  1 -
 t/t7102-reset.sh               | 48 +++++-----------------------------
 7 files changed, 15 insertions(+), 73 deletions(-)
 delete mode 100644 Documentation/config/reset.txt


base-commit: 4b8b0f6fa2778c1f9c373620e3f07787543914c6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1184%2Fvdye%2Freset%2Fclean-up-refresh-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1184/vdye/reset/clean-up-refresh-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1184
-- 
gitgitgadget

             reply	other threads:[~2022-03-21 20:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 20:34 Victoria Dye via GitGitGadget [this message]
2022-03-21 20:34 ` [PATCH 1/4] reset: do not make '--quiet' disable index refresh Victoria Dye via GitGitGadget
2022-03-23 15:59   ` Phillip Wood
2022-03-23 16:52     ` Victoria Dye
2022-03-21 20:34 ` [PATCH 2/4] reset: deprecate 'reset.quiet' config option Victoria Dye via GitGitGadget
2022-03-23 16:00   ` Phillip Wood
2022-03-21 20:34 ` [PATCH 3/4] reset: deprecate 'reset.refresh' " Victoria Dye via GitGitGadget
2022-03-23 16:02   ` Phillip Wood
2022-03-23 17:19     ` Victoria Dye
2022-03-21 20:34 ` [PATCH 4/4] reset: deprecate '--refresh', leaving only '--no-refresh' Victoria Dye via GitGitGadget
2022-03-23 16:02   ` Phillip Wood
2022-03-23 16:58     ` Victoria Dye
2022-03-23 18:17 ` [PATCH v2 0/3] reset: make --no-refresh the only way to skip index refresh Victoria Dye via GitGitGadget
2022-03-23 18:17   ` [PATCH v2 1/3] reset: do not make '--quiet' disable " Victoria Dye via GitGitGadget
2022-03-23 18:17   ` [PATCH v2 2/3] reset: remove 'reset.quiet' config option Victoria Dye via GitGitGadget
2022-03-23 18:18   ` [PATCH v2 3/3] reset: remove 'reset.refresh' " Victoria Dye via GitGitGadget
2022-03-23 19:26   ` [PATCH v2 0/3] reset: make --no-refresh the only way to skip index refresh Derrick Stolee
2022-03-23 21:41   ` Junio C Hamano
2022-03-24 11:11   ` Phillip Wood
2022-03-24 17:13     ` Junio C Hamano
2022-03-24 17:33       ` Junio C Hamano
2022-03-24 18:01         ` Victoria Dye
2022-03-24 20:36           ` Junio C Hamano
2022-03-25 15:04         ` Derrick Stolee
2022-03-25 16:35           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1184.git.1647894889.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood123@gmail.com \
    --cc=vdye@github.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.