Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect changes to sparse_paths on update #315

Closed
wants to merge 23 commits into from
Closed

Respect changes to sparse_paths on update #315

wants to merge 23 commits into from

Conversation

ksharma-bdai
Copy link

@ksharma-bdai ksharma-bdai commented Aug 11, 2023

This patch addresses issue #265 by respecting updates to sparse_paths during gitman install, including:

  • modifications to an existing sparse_paths list (additions or deletions)
  • adding a new sparse_paths list to a previously full checkout
  • removing all sparse_paths and reverting to a full checkout

This is done without using the git sparse-checkout command and should be compatible with git versions older than 2.25 where it was introduced.

This patch was also tested against a repository whose folder structure changed between revisions and the new sparse_paths was properly respected during update.

@ksharma-bdai
Copy link
Author

Happy to make any style/structure changes - I tried to follow the conventions in the rest of git.py and the existing sparse-paths handling during install.

I ran make check and make test, all of the scenarios have tests and the new code is covered in code coverage - let me know if I missed anything else.

@ksharma-bdai
Copy link
Author

ksharma-bdai commented Aug 11, 2023

Update: After a lot of trial and error it seems like the new tests for switching between sparse modes/etc are causing the tests to run into each other during execution, e.g. per this log with bad debug it looks a lot like both versions of it_merges_sources are running at the same time-ish, resulting in one failing since they both expect 3 checkouts but use slightly different repo names (one has submodules). I'll look into this more later.

@ksharma-bdai ksharma-bdai marked this pull request as draft August 11, 2023 23:07
@ksharma-bdai
Copy link
Author

Abandoning this one to switch over to git sparse-checkout, will see if tests run into the same concurrency issues on the new PR.

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.

1 participant