From patchwork Tue Oct 15 13:56:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Arver via GitGitGadget X-Patchwork-Id: 11190393 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4508B14ED for ; Tue, 15 Oct 2019 13:56:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25149218DE for ; Tue, 15 Oct 2019 13:56:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AiCupem7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732316AbfJON4Y (ORCPT ); Tue, 15 Oct 2019 09:56:24 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51594 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732308AbfJON4X (ORCPT ); Tue, 15 Oct 2019 09:56:23 -0400 Received: by mail-wm1-f68.google.com with SMTP id 7so21019343wme.1 for ; Tue, 15 Oct 2019 06:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=rHoy5XLBWfbjNZXziz0bjrE5Oji7sBiSNTBdxx6SchQ=; b=AiCupem7kCgvp9yAqDIgUjX8D2kURiF3XgOkd8c8/rqltUA6mldYvEPYU7OlHcLDMj tU6teoQBxJJV1YLjKqZ60fJNFZb4cHmmilamZbnAHb0zimFetRENYFGofheKoD/3IKe1 GJZAa49nevI9BSYNWbnc7RRCBnxhrFWNgzdTeEO9d2/dT6w2KDplO2/+g8hBo8dzn67d B5c5p0WbmOn8LN9xMsXFayLc+mYeuZB6vSxPnxeEPVyTSnyT/6bZl+W0B2Do1oQ/In3I V7HjRlOt8ErLo/uFk97GhbT681M0mvfnTMme29v+lB57rAk0BxY+vdynoxIPAYoByTds tpIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=rHoy5XLBWfbjNZXziz0bjrE5Oji7sBiSNTBdxx6SchQ=; b=okkCQpbA9Mj04fs5mEe3eGz/fQgk07m/x8MoqnmvhvHA6f7LPkaViDOZ8dFTSLsRKp txTMuRqdeoy11AHt/rVWhVOE8ti9IoqHfp1CY2g8WI1SWZToe4oZmFZmYc3dLBg2xeMK v16zrb8Fu0bVdXIa7Z39RTym2c2+kYpEHCTxH6p8s5tBcoFNexw0kEdOnFZ2V6gNunsq 8RwMTsVrNAxUYSM/3Op+/iFWvWVPelPa8cRmPtpP7LqTi+5GeBV5htlSmF1PAANJoxcY s9RdhSp9Tsa+9eTIzSRilsWSF3OcMawroQdi0sVWwYEYYct5ihz7WSnGljwyr9O6emIk XAIA== X-Gm-Message-State: APjAAAVu8b/EAge0TswWhEOkCgx/B1lbcY37m9rHIfRdIfNT4THjmIwh d0NiQRX8fQ7CMrzSscP8xjxsJ3TV X-Google-Smtp-Source: APXvYqwAToFjjByPBi98xc8RbFIzo8HGI15j38XUA1u5CGvlCVATdy6Lyas5PTsPC4u1ci+Nh+GOMA== X-Received: by 2002:a05:600c:2549:: with SMTP id e9mr18300748wma.74.1571147781651; Tue, 15 Oct 2019 06:56:21 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 33sm39113631wra.41.2019.10.15.06.56.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Oct 2019 06:56:21 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Derrick Stolee via GitGitGadget" Date: Tue, 15 Oct 2019 13:56:04 +0000 Subject: [PATCH v4 17/17] sparse-checkout: cone mode should not interact with .gitignore Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: newren@gmail.com, Derrick Stolee , Junio C Hamano , Derrick Stolee Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Derrick Stolee During the development of the sparse-checkout "cone mode" feature, an incorrect placement of the initializer for "use_cone_patterns = 1" caused warnings to show up when a .gitignore file was present with non-cone-mode patterns. This was fixed in the original commit introducing the cone mode, but now we should add a test to avoid hitting this problem again in the future. Signed-off-by: Derrick Stolee --- t/t1091-sparse-checkout-builtin.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh index 48493e1012..14141b8f54 100755 --- a/t/t1091-sparse-checkout-builtin.sh +++ b/t/t1091-sparse-checkout-builtin.sh @@ -269,4 +269,11 @@ test_expect_success 'fail when lock is taken' ' test_i18ngrep "File exists" err ' +test_expect_success '.gitignore should not warn about cone mode' ' + git -C repo config --worktree core.sparseCheckoutCone true && + echo "**/bin/*" >repo/.gitignore && + git -C repo reset --hard 2>err && + test_i18ngrep ! "disabling cone patterns" err +' + test_done