summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-29 00:49:56 +0200
committerJunio C Hamano <gitster@pobox.com>2020-04-29 00:49:56 +0200
commit51a68dd287c86200f8da03ef105e2a5f00641a38 (patch)
tree00f3016332c6bb68fae4d510b1b08efd0e345ed7
parentMerge branch 'en/rebase-doc-hooks-called-by-accident' (diff)
parentfreshen_file(): use NULL `times' for implicit current-time (diff)
downloadgit-51a68dd287c86200f8da03ef105e2a5f00641a38.tar.xz
git-51a68dd287c86200f8da03ef105e2a5f00641a38.zip
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 6926851724..ccd34dd9e8 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);
}
/*