1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

Merge pull request #11466 from DeterminateSystems/git-mtime-warning

Git fetcher: Don't update mtime of ref file if fetching by rev
This commit is contained in:
Eelco Dolstra 2024-09-11 17:34:46 +02:00 committed by GitHub
commit 1c2508f176
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -584,9 +584,10 @@ struct GitInputScheme : InputScheme
}
try {
setWriteTime(localRefFile, now, now);
if (!input.getRev())
setWriteTime(localRefFile, now, now);
} catch (Error & e) {
warn("could not update mtime for file '%s': %s", localRefFile, e.msg());
warn("could not update mtime for file '%s': %s", localRefFile, e.info().msg);
}
if (!originalRef && !storeCachedHead(repoInfo.url, ref))
warn("could not update cached head '%s' for '%s'", ref, repoInfo.url);