{"thread":{"id":"1595","subject":"[PATCH] git-rev-list: avoid crash on broken repository","startedAt":"2005-08-19T18:28:35Z","lastAt":"2005-08-19T21:30:20Z","messageCount":2,"participants":["Sergey Vlasov","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"7571","messageId":"20050819182835.GA12057@procyon.home","threadId":"1595","inReplyTo":null,"subject":"[PATCH] git-rev-list: avoid crash on broken repository","fromName":"Sergey Vlasov","fromEmail":"vsu@altlinux.ru","sentAt":"2005-08-19T18:28:35Z","receivedAt":"2005-08-19T18:28:35Z","isPatch":true,"sender":{"key":"vsu@altlinux.ru","avatar":"https://avatars.githubusercontent.com/u/616082?v=4"},"body":"When following tags, check for parse_object() success and error out\nproperly instead of segfaulting.\n\nSigned-off-by: Sergey Vlasov <vsu@altlinux.ru>\n---\n\n rev-list.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\nf4ec41063d2f43b06b7c8e511108b4c9bf9e6ebe\ndiff --git a/rev-list.c b/rev-list.c\n--- a/rev-list.c\n+++ b/rev-list.c\n@@ -418,6 +418,8 @@ static struct commit *get_commit_referen\n \t\tif (tag_objects && !(object->flags & UNINTERESTING))\n \t\t\tadd_pending_object(object, tag->tag);\n \t\tobject = parse_object(tag->tagged->sha1);\n+\t\tif (!object)\n+\t\t\tdie(\"bad object %s\", sha1_to_hex(tag->tagged->sha1));\n \t}\n \n \t/*\n"},{"id":"7575","messageId":"7vfyt5vclv.fsf@assigned-by-dhcp.cox.net","threadId":"1595","inReplyTo":"20050819182835.GA12057@procyon.home","subject":"Re: [PATCH] git-rev-list: avoid crash on broken repository","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-19T21:30:20Z","receivedAt":"2005-08-19T21:30:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I humbly appreciate your patch, sir.  I am really sorry to be in\nthe position of having to tell you this, but earlier the Emperor\nPenguin himself gave me this shiny blue baseball bat and told me\nto show it to any deserving person.  Could you please come\ncloser and kindly extend your neck a little bit more, so I can\nswing it well at your head...\n\n  Subject: Re: [PATCH] Teach applymbox to keep the Subject: line.\n  Date: Wed, 17 Aug 2005 13:42:57 -0700\n  Message-ID: <7vfyt8thv2.fsf@assigned-by-dhcp.cox.net>\n\n  Linus Torvalds <torvalds@osdl.org> writes:\n\n  > ...\n  > Ergo: if somebody sends you mime-encoded patches, hit them\n  > with a baseball bat (politely) and teach them not to do\n  > that...\n\n  I agree with you in principle and that is why I always run\n  applymbox with the -q flag.  Maybe I should start trying the\n  baseball bat approach to see what happens.\n\n;-)\n\nAnyway, I have merged your fix and pushed it out.  Thanks for\nthe patch.\n"}]}