Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-01-27 21:53:09 +0300
committerJunio C Hamano <gitster@pobox.com>2010-01-27 21:53:09 +0300
commita5e10acbb946305ca42f510cdb196d171020238e (patch)
treee6cc9dee001ec5fba2d67d86f74889cd839b2a6d /sha1_name.c
parent93cfa7c7a85efbdb00daade4ad0afc11bd2fdf37 (diff)
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>
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_name.c b/sha1_name.c
index f4a74fe99f..04fb3b8fed 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -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)) {