Add test for Git LFS repository cloning#10724
Open
jelmer wants to merge 1 commit intopython-poetry:mainfrom
Open
Add test for Git LFS repository cloning#10724jelmer wants to merge 1 commit intopython-poetry:mainfrom
jelmer wants to merge 1 commit intopython-poetry:mainfrom
Conversation
Reviewer's GuideAdds an integration-style test ensuring Git LFS repositories are cloned correctly by the Git backend, verifying that LFS-tracked files are materialized with their actual binary content rather than remaining as pointer files. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `tests/vcs/git/test_backend.py:321-323` </location>
<code_context>
+ regular_file.write_text("This is a regular file")
+ porcelain.add(repo, str(regular_file))
+
+ # Create an LFS file with a pointer
+ lfs_content = b"This is a large binary file content for LFS storage"
+ lfs_file = source_path / "large.bin"
+
+ # Store the actual content in LFS store and create pointer
</code_context>
<issue_to_address>
**suggestion (testing):** Add an assertion that the source working tree actually contains the LFS pointer before cloning
Please also assert that `large.bin` in the source repo contains the LFS pointer text (not the raw content) before cloning. This makes the test explicitly verify that the clone + LFS integration is what materializes the real content, rather than assuming the initial file state.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Comment on lines
+321
to
+328
| # Create an LFS file with a pointer | ||
| lfs_content = b"This is a large binary file content for LFS storage" | ||
| lfs_file = source_path / "large.bin" |
There was a problem hiding this comment.
suggestion (testing): Add an assertion that the source working tree actually contains the LFS pointer before cloning
Please also assert that large.bin in the source repo contains the LFS pointer text (not the raw content) before cloning. This makes the test explicitly verify that the clone + LFS integration is what materializes the real content, rather than assuming the initial file state.
Verifies that Poetry can successfully clone Git repositories that use Git Large File Storage (LFS) and that LFS files are properly retrieved with their actual content rather than just pointer files. Fixes python-poetry#8723
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verifies that Poetry can successfully clone Git repositories that use Git Large File Storage (LFS) and that LFS files are properly retrieved with their actual content rather than just pointer files.
Resolves: #8723
Summary by Sourcery
Tests: