mirror of
https://git.zx2c4.com/cgit
synced 2025-08-04 18:14:48 +02:00
git: update to v2.2.1
Update to git version v2.2.1, including API changes. Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
10c5680efb
commit
17838ec630
5 changed files with 9 additions and 8 deletions
|
@ -17,16 +17,17 @@ static time_t read_agefile(char *path)
|
|||
time_t result;
|
||||
size_t size;
|
||||
char *buf;
|
||||
static char buf2[64];
|
||||
struct strbuf date_buf = STRBUF_INIT;
|
||||
|
||||
if (readfile(path, &buf, &size))
|
||||
return -1;
|
||||
|
||||
if (parse_date(buf, buf2, sizeof(buf2)) > 0)
|
||||
result = strtoul(buf2, NULL, 10);
|
||||
if (parse_date(buf, &date_buf) == 0)
|
||||
result = strtoul(date_buf.buf, NULL, 10);
|
||||
else
|
||||
result = 0;
|
||||
free(buf);
|
||||
strbuf_release(&date_buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue