summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-reset.txt4
-rw-r--r--builtin/reset.c4
-rwxr-xr-xt/t7102-reset.sh14
3 files changed, 4 insertions, 18 deletions
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index f4aca9dd35..01cb4c9b9c 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -109,9 +109,7 @@ OPTIONS
--refresh::
--no-refresh::
- Proactively refresh the index after a mixed reset. If unspecified, the
- behavior falls back on the `reset.refresh` config option. If neither
- `--[no-]refresh` nor `reset.refresh` are set, refresh is enabled.
+ Refresh the index after a mixed reset. Enabled by default.
--pathspec-from-file=<file>::
Pathspec is passed in `<file>` instead of commandline args. If
diff --git a/builtin/reset.c b/builtin/reset.c
index 9ce55afd1b..1d89faef5e 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -423,7 +423,6 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
};
git_config(git_reset_config, NULL);
- git_config_get_bool("reset.refresh", &refresh);
argc = parse_options(argc, argv, prefix, options, git_reset_usage,
PARSE_OPT_KEEP_DASHDASH);
@@ -529,8 +528,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
t_delta_in_ms = (getnanotime() - t_begin) / 1000000;
if (!quiet && advice_enabled(ADVICE_RESET_NO_REFRESH_WARNING) && t_delta_in_ms > REFRESH_INDEX_DELAY_WARNING_IN_MS) {
advise(_("It took %.2f seconds to refresh the index after reset. You can use\n"
- "'--no-refresh' to avoid this. Set the config setting reset.refresh to false\n"
- "to make this the default."), t_delta_in_ms / 1000.0);
+ "'--no-refresh' to avoid this."), t_delta_in_ms / 1000.0);
}
}
} else {
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index 9e4c4deee3..22477f3a31 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -493,19 +493,9 @@ test_expect_success '--mixed refreshes the index' '
'
test_expect_success '--mixed --[no-]refresh sets refresh behavior' '
- # Verify that --[no-]refresh and `reset.refresh` control index refresh
-
- # Config setting
- test_reset_refreshes_index "-c reset.refresh=true" &&
- ! test_reset_refreshes_index "-c reset.refresh=false" &&
-
- # Command line option
+ # Verify that --[no-]refresh controls index refresh
test_reset_refreshes_index "" --refresh &&
- ! test_reset_refreshes_index "" --no-refresh &&
-
- # Command line option overrides config setting
- test_reset_refreshes_index "-c reset.refresh=false" --refresh &&
- ! test_reset_refreshes_index "-c reset.refresh=true" --no-refresh
+ ! test_reset_refreshes_index "" --no-refresh
'
test_expect_success '--mixed preserves skip-worktree' '