Skip to content

Commit

Permalink
Update @{bogus.timestamp} fix not to die()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 27, 2010
1 parent 93cfa7c commit a5e10ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sha1_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
int errors = 0;
char *tmp = xstrndup(str + at + 2, reflog_len);
at_time = approxidate_careful(tmp, &errors);
if (errors)
die("Bogus timestamp '%s'", tmp);
free(tmp);
if (errors)
return -1;
}
if (read_ref_at(real_ref, at_time, nth, sha1, NULL,
&co_time, &co_tz, &co_cnt)) {
Expand Down

0 comments on commit a5e10ac

Please sign in to comment.