-
Notifications
You must be signed in to change notification settings - Fork 234
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
Add --fetch-branches and --fetch-tags options #245
Conversation
and fix --skip-fetch
Sorry for the delay, missed the notification. Will review this week. |
Hey, would you be up to reviewing this PR? The current way gitian fetches git repos causes an issue (described here) with the
This causes commit hashes to end up in the zcash version string when they shouldn't be going there. This PR's fetch commands (when run with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the thorough test @abitmore . I think one of the issues with the existing code is that tobuild
is created as a tag rather than a branch.
Your solution seems fine.
if @options[:fetch_tags] | ||
system!("cd inputs/#{dir} && git fetch -f --update-head-ok #{sanitize_path(remote["url"], remote["url"])} +refs/tags/*:refs/tags/*") | ||
end | ||
system!("cd inputs/#{dir} && git fetch -f --update-head-ok #{sanitize_path(remote["url"], remote["url"])} #{commit}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noting that the --update-head-ok
here is what makes FETCH_HEAD
unconditionally update here. without it, FETCH_HEAD
will usually be blank.
And fix --skip-fetch .
Follow-up of #238.
Features:
tobuild
is not ideal #243)git describe --tags
works when--fetch-tags
is specified (fixes Checking out source astobuild
is not ideal #243)--skip-fetch
is specified (fixes a bug)@devrandom please review. Thanks.