From patchwork Sat Sep 15 16:17:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Duy Nguyen X-Patchwork-Id: 10601497 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 857A414DB for ; Sat, 15 Sep 2018 16:18:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74B342AF3C for ; Sat, 15 Sep 2018 16:18:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 697922AF3D; Sat, 15 Sep 2018 16:18: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 2A7AA2AF4C for ; Sat, 15 Sep 2018 16:18:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728121AbeIOViT (ORCPT ); Sat, 15 Sep 2018 17:38:19 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:45843 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727313AbeIOViT (ORCPT ); Sat, 15 Sep 2018 17:38:19 -0400 Received: by mail-lf1-f68.google.com with SMTP id r4-v6so10259165lff.12 for ; Sat, 15 Sep 2018 09:18:49 -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=TW8NTny0NLELx+a9R2ql+H426IEN4BmTk4V3jr9Ub9w=; b=u7lL0c26BPoeB7e48PgJCBBt7sulZqN0kq+7sMVgvJ/TboMovHeKLrh+wvACACG3Bt DzBBQWJfg8TxsmS7POWOFtFSGeTfEejLMDDq8ZAJsSJ3pU7g5+w28jobQsbamtigzbx0 JkZvxgxI/HgnP5Bm8nX5u4T3kWk4AXESb44ugTjkVHAkH0L0ZFuCoGEnPWCqm1w63b+0 ik3EL0Uh2/uIzYrdiCLSeS3hArNlI9izbijUmX4gChJ6IBHU0/u/Z9+uSWUCud75wyH+ 0/QO6id68fExM9gDjKfB3YkczpfAWgLMd3gVFzTwNCFbIiU+HAsCl5dssrA20pyGPph5 PUbg== 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=TW8NTny0NLELx+a9R2ql+H426IEN4BmTk4V3jr9Ub9w=; b=U1o2bGUEfJrBB5iS/JvMbDmGfT2bIIhhOKDLS9k00ca5ISpOfRkp1teD0E3ZCsisAM /BWg1FXIH0y0NH0bWLZ3IScmy3frDQJPStEiZIFv8YPNrN/utrpM9MmgGt2cvEd2b8t0 yf4vyYCLc42hcq8Tjh18ZXHAbrL1yBLCkZkgCcMb126UgcZj5U5JpOQncboTYyMmDNWK ByI27zlk7enI9CYqij32QzBNzvWmXOJBuXCyG/oPHdfixMDXeUAroJWgn4az7tdYwgpS NNiMpiBk9vCstUNODBTd4+ex+oWldy3PnygmZUChjDxjNHYcwKtBSfdvr/s0T18wYeM5 7DUA== X-Gm-Message-State: APzg51DmbWXx/RweStuZbckL2l+bcwSRO8d3MZZGDSMsSY6zuOmKrcow 4oStg98cKA9T7fOizcUZxPCmiCri X-Google-Smtp-Source: ANB0VdZuTGA8QMtofAHc1I7DwBCPCvSuiKOGhTNCfzE9uJeyCZevOP95W7C8vj9wWNZx1/RjteGV9w== X-Received: by 2002:a19:9f06:: with SMTP id i6-v6mr11413807lfe.149.1537028328427; Sat, 15 Sep 2018 09:18:48 -0700 (PDT) Received: from localhost.localdomain (c80-216-12-205.bredband.comhem.se. [80.216.12.205]) by smtp.gmail.com with ESMTPSA id i2-v6sm1934852lfa.78.2018.09.15.09.18.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Sep 2018 09:18:47 -0700 (PDT) From: =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= To: git@vger.kernel.org Cc: Junio C Hamano , Stefan Beller , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= Subject: [PATCH v4 09/23] read-cache.c: remove implicit dependency on the_index Date: Sat, 15 Sep 2018 18:17:45 +0200 Message-Id: <20180915161759.8272-10-pclouds@gmail.com> X-Mailer: git-send-email 2.19.0.rc0.337.ge906d732e7 In-Reply-To: <20180915161759.8272-1-pclouds@gmail.com> References: <20180909085418.31531-1-pclouds@gmail.com> <20180915161759.8272-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 --- read-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/read-cache.c b/read-cache.c index 6f772b2885..563500fe98 100644 --- a/read-cache.c +++ b/read-cache.c @@ -823,7 +823,7 @@ struct cache_entry *make_cache_entry(struct index_state *istate, ce->ce_namelen = len; ce->ce_mode = create_ce_mode(mode); - ret = refresh_cache_entry(&the_index, ce, refresh_options); + ret = refresh_cache_entry(istate, ce, refresh_options); if (ret != ce) discard_cache_entry(ce); return ret; @@ -1493,7 +1493,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, if (ignore_submodules && S_ISGITLINK(ce->ce_mode)) continue; - if (pathspec && !ce_path_match(&the_index, ce, pathspec, seen)) + if (pathspec && !ce_path_match(istate, ce, pathspec, seen)) filtered = 1; if (ce_stage(ce)) {