summaryrefslogtreecommitdiff
path: root/advice.h
diff options
context:
space:
mode:
authorVictoria Dye <vdye@github.com>2022-03-15 01:49:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-03-15 01:51:56 (GMT)
commitfd56fba97f26bf668749207efd6a45aee2e2f57c (patch)
treee13d2c651f2e61f146d83cbafa209577ab4b0def /advice.h
parente86ec71d20d14861e4a3d047800d3ea3099c946d (diff)
downloadgit-fd56fba97f26bf668749207efd6a45aee2e2f57c.zip
git-fd56fba97f26bf668749207efd6a45aee2e2f57c.tar.gz
git-fd56fba97f26bf668749207efd6a45aee2e2f57c.tar.bz2
reset: introduce --[no-]refresh option to --mixed
Add a new --[no-]refresh option that is intended to explicitly determine whether a mixed reset should end in an index refresh. Starting at 9ac8125d1a (reset: don't compute unstaged changes after reset when --quiet, 2018-10-23), using the '--quiet' option results in skipping the call to 'refresh_index(...)' at the end of a mixed reset with the goal of improving performance. However, by coupling behavior that modifies the index with the option that silences logs, there is no way for users to have one without the other (i.e., silenced logs with a refreshed index) without incurring the overhead of a separate call to 'git update-index --refresh'. Furthermore, there is minimal user-facing documentation indicating that --quiet skips the index refresh, potentially leading to unexpected issues executing commands after 'git reset --quiet' that do not themselves refresh the index (e.g., internals of 'git stash', 'git read-tree'). To mitigate these issues, '--[no-]refresh' and 'reset.refresh' are introduced to provide a dedicated mechanism for refreshing the index. When either is set, '--quiet' and 'reset.quiet' revert to controlling only whether logs are silenced and do not affect index refresh. Helped-by: Derrick Stolee <derrickstolee@github.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.h')
0 files changed, 0 insertions, 0 deletions