From patchwork Sun Oct 11 16:03:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ren=C3=A9_Scharfe?= X-Patchwork-Id: 11830929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A1EFC43457 for ; Sun, 11 Oct 2020 16:03:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5881B2223C for ; Sun, 11 Oct 2020 16:03:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=web.de header.i=@web.de header.b="shi2AF0C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387739AbgJKQD5 (ORCPT ); Sun, 11 Oct 2020 12:03:57 -0400 Received: from mout.web.de ([217.72.192.78]:33065 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387696AbgJKQDo (ORCPT ); Sun, 11 Oct 2020 12:03:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1602432220; bh=4jpPmmx2V78wfa0tAROZhDSPYbETw8uXAogbxQMHRB8=; h=X-UI-Sender-Class:To:Cc:From:Subject:Date; b=shi2AF0Cjj0mhWhLPcSLpWi0f1Zuu5r8Li6aH+BG/HUsKGlc14nsMpRaeFw/EGsQJ 5ZBLwe/oJ5u/gorAxP2jRQ41eIKuv2s10lG8iqo7WSiAI8YrJb0T0YB5o328O0XnAl 2gRrHWoVF2Vc2Hxev35xiIqxlVR39ab5RV3F5ncc= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.178.26] ([91.47.158.172]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LhNs4-1k5lL22A6a-00mdGX; Sun, 11 Oct 2020 18:03:40 +0200 X-Mozilla-News-Host: news://nntp.public-inbox.org:119 To: Git Mailing List Cc: Junio C Hamano From: =?utf-8?q?Ren=C3=A9_Scharfe?= Subject: [PATCH] line-log: handle deref_tag() returning NULL Message-ID: <90968bb8-61da-e31e-e697-97cbe048e73e@web.de> Date: Sun, 11 Oct 2020 18:03:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Language: en-US X-Provags-ID: V03:K1:ER4Z7EMzZmNiX2crILXu38b0yeBzLmneo3I1bI9B8eDCo9ZqF71 /fRDxGDV//JFdBZZD740Q6xXlbIEtYxa3DV/Nm3xgMQIxpE7ij33KE4aANIcTv0apTAv7bN Nh0b+Gj+gEPXMfvj7hX78yvlIrnEERHexKlpPQnt4uMKUEBmOwQmjSqjsaW1Ny2anag2ZSr wLolW2tTU3BxU+fqY2UqA== X-UI-Out-Filterresults: notjunk:1;V03:K0:qGpQ6bH6+rc=:toFU8nBYwyRZs60fwXjKAA 8KHM5IEItq5zWh5Ua2OQldRzG9BSvT/fTvrvVZqVqUWSVhGpIVUeWQLFLJldNsgheuLTcAM0V Bmkpdgz+NcDyNQWWPYXw10AJZgKwT2m3ctpF7gIz+EeQiC3lkY93sCrxDUUsvdS8v1GxtBmkn 3Tfjwje4VvyPtsUWBp6ZKrBf/31zR/aZIDlDTxXlqvuXcC8O3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List: git@vger.kernel.org Signed-off-by: René Scharfe --- line-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.28.0 diff --git a/line-log.c b/line-log.c index 68eeb425f8..75c8b1acff 100644 --- a/line-log.c +++ b/line-log.c @@ -481,7 +481,7 @@ static struct commit *check_single_commit(struct rev_info *revs) if (obj->flags & UNINTERESTING) continue; obj = deref_tag(revs->repo, obj, NULL, 0); - if (obj->type != OBJ_COMMIT) + if (!obj || obj->type != OBJ_COMMIT) die("Non commit %s?", revs->pending.objects[i].name); if (commit) die("More than one commit to dig from: %s and %s?",