Skip to content

Fetch git specify ref#84

Closed
basvandijk wants to merge 2 commits intomasterfrom
fetchGit-specify-ref
Closed

Fetch git specify ref#84
basvandijk wants to merge 2 commits intomasterfrom
fetchGit-specify-ref

Conversation

@basvandijk
Copy link
Copy Markdown
Collaborator

This is to work around a bug in builtins.fetchGit where
specifying a rev which is not an ancestor of HEAD
results in a git error. When setting ref to rev we
force Nix to fetch the rev.

TODO: This hack can be removed once the following is
merged and released: NixOS/nix#3408

`libtest` defaults to the number of cores which is often too much parallelism.
This is to work around a bug in `builtins.fetchGit` where
specifying a `rev` which is not an ancestor of HEAD
results in a git error. When setting `ref` to `rev` we
force Nix to fetch the `rev`.

TODO: This hack can be removed once the following is
merged and released:
NixOS/nix#3408
Copy link
Copy Markdown
Collaborator

@nmattia nmattia left a comment

Choose a reason for hiding this comment

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

LGTM! I can you remove the thread related changes?

@basvandijk
Copy link
Copy Markdown
Collaborator Author

This was more of an experiment and I intend to remove this.

I think the longer term solution is to support branch and tag attributes in git sources like I implemented here: #85

@nmattia
Copy link
Copy Markdown
Collaborator

nmattia commented Mar 16, 2020

Gotcha, closing this then!

@nmattia nmattia closed this Mar 16, 2020
@nmattia nmattia deleted the fetchGit-specify-ref branch March 16, 2020 12:52
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.

2 participants