From patchwork Tue Mar 26 07:53:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 10870595 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 8DADD1390 for ; Tue, 26 Mar 2019 07:53:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DCAA28D18 for ; Tue, 26 Mar 2019 07:53:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71DB629087; Tue, 26 Mar 2019 07:53:27 +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 082DE28D18 for ; Tue, 26 Mar 2019 07:53:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731288AbfCZHx0 (ORCPT ); Tue, 26 Mar 2019 03:53:26 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33848 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731173AbfCZHxY (ORCPT ); Tue, 26 Mar 2019 03:53:24 -0400 Received: by mail-pg1-f196.google.com with SMTP id v12so7899406pgq.1 for ; Tue, 26 Mar 2019 00:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fRBVO+tdZ0RV4AIHOSBVwKyPeY09NRlNAuC3uTvfO2c=; b=TxwXb28KggUhODXsipSiLYTk75wn1qd8U7mqzCEvIzIJK1j62OGFw8MHPtxqlJpgl5 +jndDhntAtNn2YTD09lh9PR08Ul/fpHRbG6ElwAl+1Hx1eHApSbkSmf9jDqGLYHIM4EZ SF2Mf5EpPfNrCrY+QZSPJo20pYeirWIcp6LovYT5bkyAlh8wTL+LY3dJAzLhfIUNsmpf Lgu37wam2dRsMuItJKWJZO2lfdwNvT2aVvAoI56T2KOjq4l4oJ8/yuK32YBZ8shI1lV5 ICnOKacJ0xb60AF/uU0qUtcDzL0eOsF/sPGteaijEVvzNDKjijow+bNlgx6lZHFTa5aW fW3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fRBVO+tdZ0RV4AIHOSBVwKyPeY09NRlNAuC3uTvfO2c=; b=CWIzFhDCS78paBZ8wvcAKnhk2aCzipDRzydfAknTdn2CNwg1iOGletqznEYRcRjzrY 2HEygzet89+BbOtMxbEwMkqDZt0Z3kJCWN/yB22HUu18HL4IQh2Hj1q8z4bfPrtvdrOE jeW0MEsmo1nOJDpZ1ARiuJeaEemoyq0XQ8weL/xorhuvk4svw3nnm6N0ptBTVpe7Ffyn hp8iVF6VCFBBc+nC5eTWylwQk7qoJL8duUfUDsM1Zt9DrZ616cEMUSdnkFVB9B6C+g3/ RYrOnMpe4R0zjAy0nlQleVe0kxaL0rHx6i6tUjoWm88pMpnasTCHJxVgCRH7Cbmy1p60 P4+w== X-Gm-Message-State: APjAAAXd/C+u6JlwSgY2rRz494Jy5dIwnf+/zlFJh8wp66eur2GucFVs EbV3rJT1xwvEQTE0IW3yfW8RRgXl X-Google-Smtp-Source: APXvYqxUXPyikWsJOu828v0+LaaOVnGsRwwQFoFK98kolH7BTc4xfMJriJ+TRkA2tZzokeAUXBx9Ag== X-Received: by 2002:a63:6e8d:: with SMTP id j135mr27224120pgc.160.1553586802916; Tue, 26 Mar 2019 00:53:22 -0700 (PDT) Received: from archbookpro.localdomain (c-73-222-73-77.hsd1.ca.comcast.net. [73.222.73.77]) by smtp.gmail.com with ESMTPSA id 10sm3920524pfh.14.2019.03.26.00.53.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2019 00:53:22 -0700 (PDT) Date: Tue, 26 Mar 2019 00:53:20 -0700 From: Denton Liu To: Git Mailing List Cc: Jeff King , =?iso-8859-1?q?=C6var_Arnfj=F6r=F0?= Bjarmason , Robert Dailey Subject: [PATCH 2/3] t7004: ensure recursive tag behavior is working Message-ID: References: <20190325233723.GD23728@sigill.intra.peff.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add tests to ensure that recursive tags are disallowed unless the "--allow-recursive-tag" option is provided. Signed-off-by: Denton Liu --- t/t7004-tag.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 7a7c0ccee9..5297da952d 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1700,6 +1700,14 @@ test_expect_success '--points-at finds annotated tags of tags' ' test_cmp expect actual ' +test_expect_success 'recursive tagging should fail without --allow-recursive-tag' ' + test_must_fail git tag -m recursive recursive annotated-v4.0 +' + +test_expect_success 'recursive tagging should pass with --allow-recursive-tag' ' + git tag --allow-recursive-tag -m recursive recursive annotated-v4.0 +' + test_expect_success 'multiple --points-at are OR-ed together' ' cat >expect <<-\EOF && v2.0