summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9786f68)
raw | patch | inline | side by side (parent: 9786f68)
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | |
Mon, 18 Feb 2008 20:48:03 +0000 (21:48 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 19 Feb 2008 04:49:13 +0000 (20:49 -0800) |
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c | patch | blob | history | |
shallow.c | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/commit.c b/commit.c
index 5d57450de36911ccc37db95cc0701d242cb0ef04..22ce7768639465f896e52b08a73cf5605940700b 100644 (file)
--- a/commit.c
+++ b/commit.c
while (parents) {
struct commit *commit = parents->item;
- parse_commit(commit);
- if (!(commit->object.flags & mark)) {
+ if (!parse_commit(commit) && !(commit->object.flags & mark)) {
commit->object.flags |= mark;
insert_by_date(commit, list);
}
diff --git a/shallow.c b/shallow.c
index dbd9f5ad0ac21e70fc3a095d8e2938f245c238d3..ab975482d0571fa4b647bb3bc9f5032947dc0f3e 100644 (file)
--- a/shallow.c
+++ b/shallow.c
cur_depth = *(int *)commit->util;
}
}
- parse_commit(commit);
+ if (parse_commit(commit))
+ die("invalid commit");
commit->object.flags |= not_shallow_flag;
cur_depth++;
for (p = commit->parents, commit = NULL; p; p = p->next) {
diff --git a/upload-pack.c b/upload-pack.c
index 51e3ec49d120f2e5a095cde45eb0a22bb7e624da..d1d2c2a1f77a53417e7bebcd71bffe5b1588f8f3 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
/* make sure the real parents are parsed */
unregister_shallow(object->sha1);
object->parsed = 0;
- parse_commit((struct commit *)object);
+ if (parse_commit((struct commit *)object))
+ die("invalid commit");
parents = ((struct commit *)object)->parents;
while (parents) {
add_object_array(&parents->item->object,