Browse Source

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

* jk/fetch-mark-complete-optimization:
  fetch: avoid repeated commits in mark_complete
maint
Junio C Hamano 14 years ago
parent
commit
ce5e95383d
  1. 6
      builtin/fetch-pack.c

6
builtin/fetch-pack.c

@ -472,8 +472,10 @@ static int mark_complete(const char *path, const unsigned char *sha1, int flag, @@ -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;
}

Loading…
Cancel
Save