From patchwork Fri Sep 21 15:57:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10610539 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 364FE1709 for ; Fri, 21 Sep 2018 15:57:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 261A22E56D for ; Fri, 21 Sep 2018 15:57:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A7172E578; Fri, 21 Sep 2018 15:57:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B36972E57E for ; Fri, 21 Sep 2018 15:57:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390424AbeIUVrY (ORCPT ); Fri, 21 Sep 2018 17:47:24 -0400 Received: from mail-lj1-f169.google.com ([209.85.208.169]:37594 "EHLO mail-lj1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389545AbeIUVrY (ORCPT ); Fri, 21 Sep 2018 17:47:24 -0400 Received: by mail-lj1-f169.google.com with SMTP id v9-v6so12113456ljk.4 for ; Fri, 21 Sep 2018 08:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=834Qk02aWwZS8GOZHqG2A9vgI9K0cTmHcwV+ppqEPR8=; b=Tbt0U2uWfanlwwblfmAxqsG07NlBX69WLVDtvlRIHSBOuMrEBMTQtlH5voYky8iR05 S7w/q5ssktK+BLbnOHAUtOE13R/W2McW6XiM+/VI+VUKHoHJVGghC1Z2XnSjj82n9cie CgM8zqbiK6Hv99Y6pSADEwtriIZqkvelIHIuCfrvfSOGpmvortznHaxSREGukPZd3g+d BoOTPmG7chIaKqjfDQROuZI00RMxjQZv14ZHkQ/fYMcfdfuHCjG9+2bhTjMfaedz1WKH Z5ms5afEYxgxKZZAoT4MBC+K7O1G+WXNqWk6FOAPhtoR6JNIyFC88wzt/NUzfI+mE9vl xGEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=834Qk02aWwZS8GOZHqG2A9vgI9K0cTmHcwV+ppqEPR8=; b=IWmtd+M3gpCVFrYzfE3hhH9p7rjZnOnI1UboxU7Qc5yQaO5hNndpbdbZ2ObDw0d8jJ urleoh1f79GpAwDUxrIZnC2TXsO08ejm+p3b2dhkGGzOlVu4VGd+pyTzQlNuAuyQ5AE6 I03XqnMlWClqPYef5ZekRUfzSRwQnDjIqRhGLwzTsLQuHuy0Tc5KSaeGAH0NvZs/rgdX 78Sa6GYA/LlQJpdrGB1MFkV8sqYoXE3GK2cQLM7Kzkn+9GT9ggrmFG3bHCED4KcChFCl d/LoVYeHzFDm0bVOaDTSadh6bSROYyEWvqaecdbeUPV1D7FywQ650+EEzzfFPE2/QGhM Y+SA== X-Gm-Message-State: APzg51DIj/cZAkA1IQHY5vOMXLkbaeuHiBTvA83i1lZpH7TMvsdDk1x7 RgvO5sEmM5aL4062Fcpvmg79M71O X-Google-Smtp-Source: ACcGV62+nGBM4QzqMTox9pYsCNTvtIoHjSCflZX5aEJTDt2eB22CW1Xwl3A2WS4Tggsi1GjVsp7w2g== X-Received: by 2002:a2e:811:: with SMTP id 17-v6mr2479605lji.140.1537545472508; Fri, 21 Sep 2018 08:57:52 -0700 (PDT) Received: from localhost.localdomain (c80-216-12-205.bredband.comhem.se. [80.216.12.205]) by smtp.gmail.com with ESMTPSA id o19-v6sm2192978lfk.30.2018.09.21.08.57.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 08:57:51 -0700 (PDT) From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: pclouds@gmail.com Cc: git@vger.kernel.org, gitster@pobox.com, sbeller@google.com Subject: [PATCH v5 04/23] combine-diff.c: remove implicit dependency on the_index Date: Fri, 21 Sep 2018 17:57:20 +0200 Message-Id: <20180921155739.14407-5-pclouds@gmail.com> X-Mailer: git-send-email 2.19.0.640.gcd3aa10a8a In-Reply-To: <20180921155739.14407-1-pclouds@gmail.com> References: <20180915161759.8272-1-pclouds@gmail.com> <20180921155739.14407-1-pclouds@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- combine-diff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/combine-diff.c b/combine-diff.c index de7695e728..4fa7707b57 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -1054,7 +1054,8 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent, if (is_file) { struct strbuf buf = STRBUF_INIT; - if (convert_to_git(&the_index, elem->path, result, len, &buf, global_conv_flags_eol)) { + if (convert_to_git(rev->diffopt.repo->index, + elem->path, result, len, &buf, global_conv_flags_eol)) { free(result); result = strbuf_detach(&buf, &len); result_size = len;