mirror of
https://github.com/NixOS/nix
synced 2025-07-02 21:51:50 +02:00
Style fixes
This commit is contained in:
parent
564faa6b4e
commit
61289ceee3
2 changed files with 7 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue