{"thread":{"id":"11689","subject":"[PATCH] parse_object_buffer: don't ignore errors from the object specific parsing functions","startedAt":"2008-01-21T07:21:52Z","lastAt":"2008-01-21T07:21:52Z","messageCount":1,"participants":["Martin Koegler"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"66094","messageId":"1200900112513-git-send-email-mkoegler@auto.tuwien.ac.at","threadId":"11689","inReplyTo":null,"subject":"[PATCH] parse_object_buffer: don't ignore errors from the object specific parsing functions","fromName":"Martin Koegler","fromEmail":"mkoegler@auto.tuwien.ac.at","sentAt":"2008-01-21T07:21:52Z","receivedAt":"2008-01-21T07:21:52Z","isPatch":true,"sender":{"key":"mkoegler@auto.tuwien.ac.at","avatar":null},"body":"Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>\n---\n object.c |   12 ++++++++----\n 1 files changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/object.c b/object.c\nindex 5a5ebe2..4e7f27a 100644\n--- a/object.c\n+++ b/object.c\n@@ -140,7 +140,8 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t\n \tif (type == OBJ_BLOB) {\n \t\tstruct blob *blob = lookup_blob(sha1);\n \t\tif (blob) {\n-\t\t\tparse_blob_buffer(blob, buffer, size);\n+\t\t\tif (parse_blob_buffer(blob, buffer, size))\n+\t\t\t\treturn NULL;\n \t\t\tobj = &blob->object;\n \t\t}\n \t} else if (type == OBJ_TREE) {\n@@ -148,14 +149,16 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t\n \t\tif (tree) {\n \t\t\tobj = &tree->object;\n \t\t\tif (!tree->object.parsed) {\n-\t\t\t\tparse_tree_buffer(tree, buffer, size);\n+\t\t\t\tif (parse_tree_buffer(tree, buffer, size))\n+\t\t\t\t\treturn NULL;\n \t\t\t\teaten = 1;\n \t\t\t}\n \t\t}\n \t} else if (type == OBJ_COMMIT) {\n \t\tstruct commit *commit = lookup_commit(sha1);\n \t\tif (commit) {\n-\t\t\tparse_commit_buffer(commit, buffer, size);\n+\t\t\tif (parse_commit_buffer(commit, buffer, size))\n+\t\t\t\treturn NULL;\t\n \t\t\tif (!commit->buffer) {\n \t\t\t\tcommit->buffer = buffer;\n \t\t\t\teaten = 1;\n@@ -165,7 +168,8 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t\n \t} else if (type == OBJ_TAG) {\n \t\tstruct tag *tag = lookup_tag(sha1);\n \t\tif (tag) {\n-\t\t\tparse_tag_buffer(tag, buffer, size);\n+\t\t\tif (parse_tag_buffer(tag, buffer, size))\n+\t\t\t       return NULL;\n \t\t\tobj = &tag->object;\n \t\t}\n \t} else {\n-- \ngitgui.0.9.1.gf4a7e2\n"}]}