Skip to content

Specifically fetch the requested commit #238

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

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

dongcarl
Copy link
Contributor

@dongcarl dongcarl commented Dec 3, 2020

Instead of fetching all tags and all heads, just fetch the requested commit. This accomplishes two things:

  1. Avoids overzealous fetching of unrelated objects from the repo
  2. Allows building commits which do not belong to any branch in a repository, such as merge commits generated by DrahtBot (example). Previously this was not possible.

Instead of fetching all tags and all heads, just fetch the requested commit. This accomplishes two things:

1. Avoids overzealous fetching of unrelated objects from the repo
2. Allows building commits which do not belong to any branch in a repository, such as merge commits generated by DrahtBot ([example](bitcoin/bitcoin@4cd306c)). Previously this was not possible.
@dongcarl dongcarl requested a review from devrandom as a code owner December 3, 2020 20:31
@devrandom devrandom merged commit c39533e into devrandom:master Dec 3, 2020
@maflcko
Copy link

maflcko commented Dec 4, 2020

Interesting TIL that fetching by commit is possible. Though, it seems to only work with the full hash (not a truncated one)

@MarkLTZ
Copy link

MarkLTZ commented Dec 7, 2020

After this commit, building of Bitcoin 0.19.1 does not work anymore. Did I miss some documentation update?

@devrandom
Copy link
Owner

@MarkLTZ what are the actual symptoms?

@MarkLTZ
Copy link

MarkLTZ commented Dec 7, 2020

From https://github.com/bitcoin/bitcoin
 * tag                   v0.19.1     -> FETCH_HEAD
error: pathspec 'v0.19.1' did not match any file(s) known to git.
Traceback (most recent call last):
	3: from bin/gbuild:307:in `<main>'
	2: from bin/gbuild:307:in `each'
	1: from bin/gbuild:322:in `block in <main>'
bin/gbuild:23:in `system!': failed to run cd inputs/bitcoin && git checkout -q v0.19.1 (RuntimeError)

Using a cloned version of this repo with this commit rolled back everything work.

@MarkLTZ
Copy link

MarkLTZ commented Dec 7, 2020

These are commands used to compile:

export NAME=Mark
export VERSION=0.19.1

./gitian-build.py --setup $NAME $VERSION

./gitian-build.py --build --os l --detach-sign --no-commit --jobs 4 $NAME $VERSION

devrandom added a commit that referenced this pull request Dec 7, 2020
@devrandom
Copy link
Owner

devrandom commented Dec 7, 2020

Thank you @MarkLTZ. Fixing in #239... and #240.

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.

4 participants