Ensure ref passed to builtins.fetchGit points to refs/tags/sourceSpec.tag

This commit is contained in:
Michael Lingelbach 2021-01-22 13:42:49 -08:00 committed by adisbladis
parent 26ea0644b3
commit 9191fbae30
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -161,7 +161,7 @@ pythonPackages.callPackage
builtins.fetchGit {
inherit (source) url;
rev = source.resolved_reference or source.reference;
ref = sourceSpec.branch or sourceSpec.rev or sourceSpec.tag or "HEAD";
ref = sourceSpec.branch or sourceSpec.rev or (if sourceSpec?tag then "refs/tags/${sourceSpec.tag}" else "HEAD");
}
)
else if isUrl then