Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/scalar-functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:

env:
BUILD_FRAGMENT: bin/Release/netcoreapp3.1
GIT_TEST_FAIL_ENSURE_FULL_INDEX: 1

steps:
- name: Check out Git's source code
Expand Down
10 changes: 10 additions & 0 deletions sparse-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@ void ensure_full_index(struct index_state *istate)
if (!istate->repo)
istate->repo = the_repository;

if (!istate->repo->settings.command_requires_full_index) {
static int fail_on_expand = -1;

if (fail_on_expand < 0)
fail_on_expand = git_env_bool("GIT_TEST_FAIL_ENSURE_FULL_INDEX", 0);

if (fail_on_expand)
die("sparse index will expand in an integrated command");
}

trace2_region_enter("index", "ensure_full_index", istate->repo);

/* initialize basics of new index */
Expand Down