Skip to content

Commit 4d6fb2b

Browse files
committed
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
2 parents 5f0b6ed + c11e996 commit 4d6fb2b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

repo-settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void prepare_repo_settings(struct repository *r)
2222
UPDATE_DEFAULT_BOOL(r->settings.core_commit_graph, 1);
2323
UPDATE_DEFAULT_BOOL(r->settings.gc_write_commit_graph, 1);
2424

25-
if (!repo_config_get_bool(r, "index.version", &value))
25+
if (!repo_config_get_int(r, "index.version", &value))
2626
r->settings.index_version = value;
2727
if (!repo_config_get_maybe_bool(r, "core.untrackedcache", &value)) {
2828
if (value == 0)

t/t1600-index.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ test_index_version () {
8787
}
8888

8989
test_expect_success 'index version config precedence' '
90+
test_index_version 0 false 0 2 &&
91+
test_index_version 2 false 0 2 &&
92+
test_index_version 3 false 0 2 &&
93+
test_index_version 4 false 0 4 &&
9094
test_index_version 2 false 4 4 &&
9195
test_index_version 2 true 0 2 &&
9296
test_index_version 0 true 0 4 &&

0 commit comments

Comments
 (0)