1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 21:51:50 +02:00

Style fixes

This commit is contained in:
Eelco Dolstra 2022-05-02 13:37:53 +02:00
parent 564faa6b4e
commit 61289ceee3
2 changed files with 7 additions and 8 deletions

View file

@ -28,14 +28,11 @@ const std::string gitInitialBranch = "__nix_dummy_branch";
std::string getGitDir()
{
auto gitDir = getEnv("GIT_DIR");
if (!gitDir) {
return ".git";
}
return *gitDir;
return getEnv("GIT_DIR").value_or(".git");
}
bool isCacheFileWithinTtl(const time_t now, const struct stat& st) {
bool isCacheFileWithinTtl(const time_t now, const struct stat & st)
{
return st.st_mtime + settings.tarballTtl > now;
}