diff options
author | Jeff King <peff@peff.net> | 2013-10-24 04:53:01 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-24 15:43:50 -0700 |
commit | 0064053bd76ba385e1b5d51b6175bc17bc507804 (patch) | |
tree | 50da5cf8b850762e6219618292a14941fd163e2f /fetch-pack.c | |
parent | 7059dccc6c60a872a314b19ac17702065a71d6bd (diff) | |
download | git-0064053bd76ba385e1b5d51b6175bc17bc507804.tar.gz |
assume parse_commit checks commit->object.parsed
The parse_commit function will check the "parsed" flag of
the object and do nothing if it is set. There is no need
for callers to check the flag themselves, and doing so only
clutters the code.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r-- | fetch-pack.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 6684348c0e..86b69775e3 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -46,9 +46,8 @@ static void rev_list_push(struct commit *commit, int mark) if (!(commit->object.flags & mark)) { commit->object.flags |= mark; - if (!(commit->object.parsed)) - if (parse_commit(commit)) - return; + if (parse_commit(commit)) + return; prio_queue_put(&rev_list, commit); @@ -127,8 +126,7 @@ static const unsigned char *get_rev(void) return NULL; commit = prio_queue_get(&rev_list); - if (!commit->object.parsed) - parse_commit(commit); + parse_commit(commit); parents = commit->parents; commit->object.flags |= POPPED; |