Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/fetch-mark-complete-optimization'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 26 May 2011 17:32:11 +0000
(10:32 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 26 May 2011 17:32:11 +0000
(10:32 -0700)
* jk/fetch-mark-complete-optimization:
fetch: avoid repeated commits in mark_complete
builtin/fetch-pack.c
patch
|
blob
|
history
raw
(from parent 1:
a6f3f17
)
diff --git
a/builtin/fetch-pack.c
b/builtin/fetch-pack.c
index 85aff029b225c023f09fda635f16cc00a22ed7ca..56c0b4a38d30a9c32b3bee99022d19066aaa8d29 100644
(file)
--- 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;
}