diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-26 10:32:11 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-26 10:32:11 -0700 |
commit | ce5e95383d2aab5c5a4886c2d5b47e8f1d1989b9 (patch) | |
tree | 855616e9fd1501776d1cb1352b75ff46aace8157 | |
parent | Merge branch 'jn/gitweb-js' (diff) | |
parent | fetch: avoid repeated commits in mark_complete (diff) | |
download | tgif-ce5e95383d2aab5c5a4886c2d5b47e8f1d1989b9.tar.xz |
Merge branch 'jk/fetch-mark-complete-optimization'
* jk/fetch-mark-complete-optimization:
fetch: avoid repeated commits in mark_complete
-rw-r--r-- | builtin/fetch-pack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index 85aff029b2..56c0b4a38d 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -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; } |