X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=sha1_name.c;h=f4a74fe99fc69d6cc297fbf321624428793dd2e5;hb=93cfa7c7a85efbdb00daade4ad0afc11bd2fdf37;hp=44bb62d270739a232e87c90c05ce89fcc86bc15b;hpb=6674d310d179400358d581f9725cbd4a2c32e3bf;p=git.git diff --git a/sha1_name.c b/sha1_name.c index 44bb62d27..f4a74fe99 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -395,8 +395,11 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1) } else if (0 <= nth) at_time = 0; else { + int errors = 0; char *tmp = xstrndup(str + at + 2, reflog_len); - at_time = approxidate(tmp); + at_time = approxidate_careful(tmp, &errors); + if (errors) + die("Bogus timestamp '%s'", tmp); free(tmp); } if (read_ref_at(real_ref, at_time, nth, sha1, NULL,