Merge branch 'jk/fetch-mark-complete-optimization'

* jk/fetch-mark-complete-optimization:
  fetch: avoid repeated commits in mark_complete
This commit is contained in:
Junio C Hamano
2011-05-26 10:32:11 -07:00

View File

@ -472,8 +472,10 @@ static int mark_complete(const char *path, const unsigned char *sha1, int flag,
} }
if (o && o->type == OBJ_COMMIT) { if (o && o->type == OBJ_COMMIT) {
struct commit *commit = (struct commit *)o; struct commit *commit = (struct commit *)o;
commit->object.flags |= COMPLETE; if (!(commit->object.flags & COMPLETE)) {
commit_list_insert_by_date(commit, &complete); commit->object.flags |= COMPLETE;
commit_list_insert_by_date(commit, &complete);
}
} }
return 0; return 0;
} }