1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-01 16:41:47 +02:00

Merge pull request #11486 from NixOS/mergify/bp/2.24-maintenance/pr-11466

Git fetcher: Don't update mtime of ref file if fetching by rev (backport #11466)
This commit is contained in:
Eelco Dolstra 2024-09-11 19:59:10 +02:00 committed by GitHub
commit d9dd6c62d6
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);