1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-03 15:40:59 +01:00

Style fixes

(cherry picked from commit 61289ceee3)
This commit is contained in:
Eelco Dolstra 2022-05-02 13:37:53 +02:00 committed by Théophane Hufschmitt
parent 813a02c7ab
commit 812280b23a

View file

@ -23,11 +23,7 @@ const std::string gitInitialBranch = "__nix_dummy_branch";
static std::string getGitDir()
{
auto gitDir = getEnv("GIT_DIR");
if (!gitDir) {
return ".git";
}
return *gitDir;
return getEnv("GIT_DIR").value_or(".git");
}
static std::string readHead(const Path & path)