Skip to content

Conversation

@derrickstolee
Copy link

To be extra sure that our integrated commands do not expand in normal
cases, create a GIT_TEST_FAIL_ENSURE_FULL_INDEX that fails inside
ensure_full_index() if the repo settings indicate we are in an
integrated command. Enable this for the Scalar functional tests.

Inspired by a conversation with @dscho.

To be extra sure that our integrated commands do not expand in normal
cases, create a GIT_TEST_FAIL_ENSURE_FULL_INDEX that fails inside
ensure_full_index() if the repo settings indicate we are in an
integrated command. Enable this for the Scalar functional tests.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee derrickstolee requested a review from dscho September 2, 2021 14:15
@derrickstolee derrickstolee self-assigned this Sep 2, 2021
@derrickstolee
Copy link
Author

This is functioning as expected, and gives me some directions to investigate. It is possible/probable that we are testing scenarios in the Scalar functional tests that require expanding the index. If not, then it gives directions for future improvement. (The first failure I saw involved git cherry-pick so we will see!)

Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am really glad that my suggestion was worth the time to implement it!

@derrickstolee
Copy link
Author

After digging into it, it appears that this is failing during a git sparse-checkout init --cone command, and it's during the index write due to the was_full protection (if the index was full on input, we expand it back out to a full one after the write). This means we are not ready to do such a global check. Even after #421 is merged we would still need to remove that was_full protection or inject a way to disable the environment variable at some points in the Scalar functional tests. That's not worth it right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants