mirror of
https://git.proxmox.com/git/libgit2
synced 2025-07-09 11:15:57 +00:00
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>
This commit is contained in:
parent
82b1db3b35
commit
69dca95950
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user