From 0064053bd76ba385e1b5d51b6175bc17bc507804 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 24 Oct 2013 04:53:01 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- fetch-pack.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fetch-pack.c') 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; -- cgit v1.2.1