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

Git.fetch_commit #13096

Merged
merged 4 commits into from Feb 16, 2023
Merged

Git.fetch_commit #13096

merged 4 commits into from Feb 16, 2023

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Feb 10, 2023

Changelog: Feature: Add new Git.fetch_commit method, for a faster alternative than clone.
Docs: conan-io/docs#2974

Close #13081

@memsharded memsharded added this to the 1.59 milestone Feb 10, 2023
Copy link
Member

@RubenRBS RubenRBS left a comment

Choose a reason for hiding this comment

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

lgtm

if os.path.exists(url):
url = url.replace("\\", "/") # Windows local directory
self._conanfile.output.info("Shallow fetch of git repo")
self.run('init')
Copy link
Member

Choose a reason for hiding this comment

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

For anyone worried about this init as I was, reading https://git-scm.com/docs/git-init#_description says that calling init multiple times is ok

Copy link
Member Author

Choose a reason for hiding this comment

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

In any case, this keeps failing in Linux because of #13081 (comment), no idea why

@memsharded memsharded marked this pull request as ready for review February 16, 2023 08:53
@memsharded memsharded merged commit 6a39431 into conan-io:develop Feb 16, 2023
@memsharded memsharded deleted the feature/git_shallow branch February 16, 2023 09:41
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.

[question] Migration to 2.0 - SCM removal
2 participants