1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

fetchGit: use "HEAD" as default ref

(cherry picked from commit e89d02bf03)
This commit is contained in:
Will Dietz 2018-02-28 15:03:54 -06:00 committed by Eelco Dolstra
parent 7e989da790
commit 5df25a35b7
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -79,7 +79,7 @@ GitInfo exportGit(ref<Store> store, const std::string & uri,
ref = "HEAD"s; ref = "HEAD"s;
} }
if (!ref) ref = "master"s; if (!ref) ref = "HEAD"s;
if (rev != "" && !std::regex_match(rev, revRegex)) if (rev != "" && !std::regex_match(rev, revRegex))
throw Error("invalid Git revision '%s'", rev); throw Error("invalid Git revision '%s'", rev);