1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-04 08:00: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() static std::string getGitDir()
{ {
auto gitDir = getEnv("GIT_DIR"); return getEnv("GIT_DIR").value_or(".git");
if (!gitDir) {
return ".git";
}
return *gitDir;
} }
static std::string readHead(const Path & path) static std::string readHead(const Path & path)