{"thread":{"id":"12452","subject":"[PATCH] fetch-pack: check parse_commit/object results","startedAt":"2008-03-03T06:31:23Z","lastAt":"2008-03-03T06:31:23Z","messageCount":1,"participants":["Martin Koegler"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"70744","messageId":"12045258831942-git-send-email-mkoegler@auto.tuwien.ac.at","threadId":"12452","inReplyTo":null,"subject":"[PATCH] fetch-pack: check parse_commit/object results","fromName":"Martin Koegler","fromEmail":"mkoegler@auto.tuwien.ac.at","sentAt":"2008-03-03T06:31:23Z","receivedAt":"2008-03-03T06:31:23Z","isPatch":true,"sender":{"key":"mkoegler@auto.tuwien.ac.at","avatar":null},"body":"Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>\n---\nResent with other subject, as the last was rejected by the mailing list.\n\n builtin-fetch-pack.c |   17 ++++++++++-------\n 1 files changed, 10 insertions(+), 7 deletions(-)\n\ndiff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c\nindex b23e886..423d637 100644\n--- a/builtin-fetch-pack.c\n+++ b/builtin-fetch-pack.c\n@@ -41,7 +41,8 @@ static void rev_list_push(struct commit *commit, int mark)\n \t\tcommit->object.flags |= mark;\n \n \t\tif (!(commit->object.parsed))\n-\t\t\tparse_commit(commit);\n+\t\t\tif (parse_commit(commit))\n+\t\t\t\treturn;\n \n \t\tinsert_by_date(commit, &rev_list);\n \n@@ -83,7 +84,8 @@ static void mark_common(struct commit *commit,\n \t\t\tif (!ancestors_only && !(o->flags & POPPED))\n \t\t\t\tnon_common_revs--;\n \t\t\tif (!o->parsed && !dont_parse)\n-\t\t\t\tparse_commit(commit);\n+\t\t\t\tif (parse_commit(commit))\n+\t\t\t\t\treturn;\n \n \t\t\tfor (parents = commit->parents;\n \t\t\t\t\tparents;\n@@ -103,20 +105,20 @@ static const unsigned char* get_rev(void)\n \n \twhile (commit == NULL) {\n \t\tunsigned int mark;\n-\t\tstruct commit_list* parents;\n+\t\tstruct commit_list *parents = 0;\n \n \t\tif (rev_list == NULL || non_common_revs == 0)\n \t\t\treturn NULL;\n \n \t\tcommit = rev_list->item;\n \t\tif (!(commit->object.parsed))\n-\t\t\tparse_commit(commit);\n+\t\t\tif (!parse_commit(commit))\n+\t\t\t\tparents = commit->parents;\n+\n \t\tcommit->object.flags |= POPPED;\n \t\tif (!(commit->object.flags & COMMON))\n \t\t\tnon_common_revs--;\n \n-\t\tparents = commit->parents;\n"}]}