summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-26 10:32:11 -0700
committerJunio C Hamano <gitster@pobox.com>2011-05-26 10:32:11 -0700
commitce5e95383d2aab5c5a4886c2d5b47e8f1d1989b9 (patch)
tree855616e9fd1501776d1cb1352b75ff46aace8157 /builtin
parenta6f3f178bd7ce48f7fe4262a1e5efb3ae6a98a4d (diff)
parentea5f2208217a332dd02f62f3880052eaf8b1a57b (diff)
downloadgit-ce5e95383d2aab5c5a4886c2d5b47e8f1d1989b9.tar.gz
Merge branch 'jk/fetch-mark-complete-optimization'
* jk/fetch-mark-complete-optimization: fetch: avoid repeated commits in mark_complete
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fetch-pack.c6
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;
}