Commit 69dca959 by Vicent Marti Committed by Andreas Ericsson

Fixed parsing commit times (they weren't being stored at all!)

Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
parent 82b1db3b
......@@ -132,12 +132,19 @@ int git_commit__parse_time(time_t *commit_time, char *buffer, const char *buffer
if (memcmp(buffer, "committer ", 10) != 0)
return -1;
buffer = memchr(buffer, '\n', buffer_end - buffer);
buffer = memchr(buffer, '>', buffer_end - buffer);
if (buffer == 0 || ++buffer >= buffer_end)
return -1;
*commit_time = strtol(buffer, &buffer, 10);
if (*commit_time == 0)
return -1;
buffer = memchr(buffer, '\n', buffer_end - buffer);
if (buffer == 0 || ++buffer >= buffer_end)
return -1;
return (buffer < buffer_end) ? 0 : -1;
}
......
......@@ -64,10 +64,10 @@ void gitrp_sorting(git_revpool *pool, unsigned int sort_mode)
void gitrp_push(git_revpool *pool, git_commit *commit)
{
if (commit->object.pool != pool || pool->walking)
if (commit == NULL || commit->seen)
return;
if (commit->seen)
if (commit->object.pool != pool || pool->walking)
return;
if (!commit->parsed)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment