Skip to content

Commit

Permalink
Merge branch 'jk/fetch-mark-complete-optimization'
Browse files Browse the repository at this point in the history
* jk/fetch-mark-complete-optimization:
  fetch: avoid repeated commits in mark_complete
  • Loading branch information
Junio C Hamano committed May 26, 2011
2 parents a6f3f17 + ea5f220 commit ce5e953
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions builtin/fetch-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,10 @@ static int mark_complete(const char *path, const unsigned char *sha1, int flag,
}
if (o && o->type == OBJ_COMMIT) {
struct commit *commit = (struct commit *)o;
commit->object.flags |= COMPLETE;
commit_list_insert_by_date(commit, &complete);
if (!(commit->object.flags & COMPLETE)) {
commit->object.flags |= COMPLETE;
commit_list_insert_by_date(commit, &complete);
}
}
return 0;
}
Expand Down

0 comments on commit ce5e953

Please sign in to comment.