Fixed indentation issues in commit.c

Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
This commit is contained in:
Vicent Marti 2010-05-14 18:57:50 +02:00 committed by Andreas Ericsson
parent 417f0abc9b
commit 4caa8962a6
2 changed files with 13 additions and 12 deletions

View File

@ -71,21 +71,21 @@ error_cleanup:
int git_commit__parse_time(time_t *commit_time, char *buffer, const char *buffer_end)
{
if (memcmp(buffer, "author ", 7) != 0)
return -1;
if (memcmp(buffer, "author ", 7) != 0)
return -1;
buffer = memchr(buffer, '\n', buffer_end - buffer);
if (buffer == 0 || buffer >= buffer_end)
return -1;
if (memcmp(buffer, "committer ", 10) != 0)
return -1;
if (memcmp(buffer, "committer ", 10) != 0)
return -1;
buffer = memchr(buffer, '\n', buffer_end - buffer);
if (buffer == 0 || buffer >= buffer_end)
return -1;
*commit_time = strtol(buffer, &buffer, 10);
*commit_time = strtol(buffer, &buffer, 10);
return (buffer < buffer_end) ? 0 : -1;
}
@ -116,8 +116,8 @@ int git_commit__parse_oid(git_oid *oid, char **buffer_out, const char *buffer_en
int git_commit__parse_buffer(git_commit *commit, void *data, size_t len)
{
char *buffer = (char *)data;
const char *buffer_end = (char *)data + len;
char *buffer = (char *)data;
const char *buffer_end = (char *)data + len;
git_oid oid;
@ -146,5 +146,6 @@ int git_commit__parse_buffer(git_commit *commit, void *data, size_t len)
commit->parsed = 1;
return 0;
return 0;
}

View File

@ -10,11 +10,11 @@
#define GIT_COMMIT_DELAY (1 << 2)
struct git_commit {
git_oid id;
time_t commit_time;
git_oid id;
time_t commit_time;
git_revpool *pool;
unsigned parsed:1,
flags:26;
unsigned parsed:1,
flags:26;
};
int git_commit__parse_oid(git_oid *oid, char **buffer_out, const char *buffer_end, const char *header);