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 source should check out a commit before recursing submodules #898

Open
mr-cal opened this issue Nov 7, 2024 · 1 comment
Open

Git source should check out a commit before recursing submodules #898

mr-cal opened this issue Nov 7, 2024 · 1 comment
Labels
Enhancement New feature or request Triaged

Comments

@mr-cal
Copy link
Contributor

mr-cal commented Nov 7, 2024

What needs to get done

Craft-parts currently clones a project, recursively fetches submodules, then checks out a specific commit.

Option 1

Init a repo, add the remote, fetch by the commit hash, then recurse submodules.

I'm not sure if this will work because some projects depend on a full history to set the version with git describe.

Option 2:

Clone the remote, fetch by the commit, the recurse submodules.

Why it needs to get done

Fetching submodules before switching to the commit is incorrect and can fail.

@dariuszd21 can advise on this task as he has been working with these types of fetching scenarios.

source: @tomponline via https://github.com/canonical/lxd-pkg-snap/pull/594/files#r1831605307

@mr-cal mr-cal added Enhancement New feature or request Triaged labels Nov 7, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3661.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Triaged
Projects
None yet
Development

No branches or pull requests

1 participant