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

Use Git directly instead of any bindings #46

Merged
merged 2 commits into from
Oct 1, 2023
Merged

Use Git directly instead of any bindings #46

merged 2 commits into from
Oct 1, 2023

Conversation

EbonJaeger
Copy link
Member

This removes the use of go-git in favor of just calling Git directly for fetching Git sources. Repos will be shallow cloned initially, and hard resetting to update the local copy to a different revision.

Tested by building a package using a Git tag and a Git commit, and updating the local repo with a different Git tag and Git commit.

This tries to make go-git work with getting a shallow clone of a specific tag or commit. In its current state, getting a commit might work. Getting a tag, however, does not. Trying to resolve a tag ends up with a hash that doesn't exist when you try to fetch it. I don't know if I'm doing something wrong, go-git is doing something wrong, or a combination of both.

Signed-off-by: Evan Maddock <[email protected]>
@EbonJaeger EbonJaeger force-pushed the fix-go-git branch 2 times, most recently from 44d5a70 to 745a18f Compare September 29, 2023 23:08
go-git just isn't working for our needs, and we want to drop git2go and have shallow cloning, so just calling out to Git directly is the best way to go.

Signed-off-by: Evan Maddock <[email protected]>
Copy link
Member

@silkeh silkeh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@silkeh silkeh merged commit 980d89b into master Oct 1, 2023
1 check passed
@ReillyBrogan ReillyBrogan deleted the fix-go-git branch December 20, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants