Update @{bogus.timestamp} fix not to die()
The caller will say "It is not a valid object name" if it wants to, and some callers may even try to see if it names an object and otherwise try to see if it is a path. Pointed out by Jeff King. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jan 27, 2010 at 10:53 UTC
a5e10acbb946305ca42f510cdb196d171020238e
1 file changed
+2
-2
sha1_name.c
+2
-2
@@ -398,9 +398,9 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
398
int errors = 0;
399
char *tmp = xstrndup(str + at + 2, reflog_len);
400
at_time = approxidate_careful(tmp, &errors);
401
- if (errors)
402
- die("Bogus timestamp '%s'", tmp);
401
free(tmp);
402
+ if (errors)
403
+ return -1;
404
}
405
if (read_ref_at(real_ref, at_time, nth, sha1, NULL,
406
&co_time, &co_tz, &co_cnt)) {