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
This commit is contained in:
Junio C Hamano 2020-04-28 15:49:56 -07:00
Родитель 1779d181b5 312cd76130
Коммит 51a68dd287
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -881,9 +881,7 @@ void prepare_alt_odb(struct repository *r)
/* Returns 1 if we have successfully freshened the file, 0 otherwise. */ /* Returns 1 if we have successfully freshened the file, 0 otherwise. */
static int freshen_file(const char *fn) static int freshen_file(const char *fn)
{ {
struct utimbuf t; return !utime(fn, NULL);
t.actime = t.modtime = time(NULL);
return !utime(fn, &t);
} }
/* /*