summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-28 22:49:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-28 22:49:56 (GMT)
commit51a68dd287c86200f8da03ef105e2a5f00641a38 (patch)
tree00f3016332c6bb68fae4d510b1b08efd0e345ed7
parent1779d181b51252ff853b00b6ad95c6641f7bef2b (diff)
parent312cd7613013adbf9842e17a61b15d0e5950fb8c (diff)
downloadgit-51a68dd287c86200f8da03ef105e2a5f00641a38.zip
git-51a68dd287c86200f8da03ef105e2a5f00641a38.tar.gz
git-51a68dd287c86200f8da03ef105e2a5f00641a38.tar.bz2
Merge branch 'lr/freshen-file-fix'
The code that refreshes the last access and modified time of on-disk packfiles and loose object files have been updated. * lr/freshen-file-fix: freshen_file(): use NULL `times' for implicit current-time
-rw-r--r--sha1-file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sha1-file.c b/sha1-file.c
index 6926851..ccd34dd 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -881,9 +881,7 @@ void prepare_alt_odb(struct repository *r)
/* Returns 1 if we have successfully freshened the file, 0 otherwise. */
static int freshen_file(const char *fn)
{
- struct utimbuf t;
- t.actime = t.modtime = time(NULL);
- return !utime(fn, &t);
+ return !utime(fn, NULL);
}
/*