mirror of https://github.com/git/git.git
Merge branch 'ds/feature-macros'
The codepath that reads the index.version configuration was broken with a recent update, which has been corrected. * ds/feature-macros: repo-settings: read an int for index.version
This commit is contained in:
commit
4d6fb2beeb
|
@ -22,7 +22,7 @@ void prepare_repo_settings(struct repository *r)
|
||||||
UPDATE_DEFAULT_BOOL(r->settings.core_commit_graph, 1);
|
UPDATE_DEFAULT_BOOL(r->settings.core_commit_graph, 1);
|
||||||
UPDATE_DEFAULT_BOOL(r->settings.gc_write_commit_graph, 1);
|
UPDATE_DEFAULT_BOOL(r->settings.gc_write_commit_graph, 1);
|
||||||
|
|
||||||
if (!repo_config_get_bool(r, "index.version", &value))
|
if (!repo_config_get_int(r, "index.version", &value))
|
||||||
r->settings.index_version = value;
|
r->settings.index_version = value;
|
||||||
if (!repo_config_get_maybe_bool(r, "core.untrackedcache", &value)) {
|
if (!repo_config_get_maybe_bool(r, "core.untrackedcache", &value)) {
|
||||||
if (value == 0)
|
if (value == 0)
|
||||||
|
|
|
@ -87,6 +87,10 @@ test_index_version () {
|
||||||
}
|
}
|
||||||
|
|
||||||
test_expect_success 'index version config precedence' '
|
test_expect_success 'index version config precedence' '
|
||||||
|
test_index_version 0 false 0 2 &&
|
||||||
|
test_index_version 2 false 0 2 &&
|
||||||
|
test_index_version 3 false 0 2 &&
|
||||||
|
test_index_version 4 false 0 4 &&
|
||||||
test_index_version 2 false 4 4 &&
|
test_index_version 2 false 4 4 &&
|
||||||
test_index_version 2 true 0 2 &&
|
test_index_version 2 true 0 2 &&
|
||||||
test_index_version 0 true 0 4 &&
|
test_index_version 0 true 0 4 &&
|
||||||
|
|
Loading…
Reference in New Issue