mirror of
https://github.com/NixOS/nix.git
synced 2025-12-04 08:00: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()
|
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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue