mirror of
https://github.com/NixOS/nix.git
synced 2025-12-03 15:40:59 +01:00
parent
813a02c7ab
commit
812280b23a
1 changed files with 1 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue