git: Update the mtime of the just-updated checkout.
authorLudovic Courtès <ludo@gnu.org>
Fri, 11 Jun 2021 21:32:45 +0000 (23:32 +0200)
committerLudovic Courtès <ludo@gnu.org>
Fri, 11 Jun 2021 22:49:32 +0000 (00:49 +0200)
commitbaf0a4288264098ede43e4f7cd099a29fcf35be4
tree48f3e4bdfe67ef7f287530c9587dad49cf2990e7
parent6a9abdcd5db7621a451af310c9a42a9bbfb228d6
git: Update the mtime of the just-updated checkout.

Reported by zimoun <zimon.toutoune@gmail.com>.

Previously, the mtime of CACHE-DIRECTORY may or may not have been
updated after a pull.  Thus, 'maybe-remove-expired-cache-entries' could
potentially delete CACHE-DIRECTORY right before it's returned.

* guix/git.scm (update-cached-checkout): Call 'utime' on CACHE-DIRECTORY.
guix/git.scm