mirror of
https://github.com/NixOS/nix
synced 2025-06-27 12:41:15 +02:00
Fetch specific Git revisions
This is more efficient, and necessary when using shallow=1 with a rev.
This commit is contained in:
parent
f450c8773c
commit
e4066c0444
2 changed files with 5 additions and 4 deletions
|
@ -518,8 +518,11 @@ struct GitInputScheme : InputScheme
|
|||
|
||||
if (doFetch) {
|
||||
try {
|
||||
auto fetchRef = getAllRefsAttr(input)
|
||||
auto fetchRef =
|
||||
getAllRefsAttr(input)
|
||||
? "refs/*"
|
||||
: input.getRev()
|
||||
? input.getRev()->gitRev()
|
||||
: ref.compare(0, 5, "refs/") == 0
|
||||
? ref
|
||||
: ref == "HEAD"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue