From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.2 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MALFORMED_FREEMAIL,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id DBE4D20248 for ; Wed, 13 Mar 2019 09:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726916AbfCMJOB (ORCPT ); Wed, 13 Mar 2019 05:14:01 -0400 Received: from mout.gmx.net ([212.227.15.19]:35077 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfCMJOB (ORCPT ); Wed, 13 Mar 2019 05:14:01 -0400 Received: from [192.168.0.129] ([37.201.195.16]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MCLx3-1hD6e23MzR-0097RF; Wed, 13 Mar 2019 10:13:55 +0100 Date: Wed, 13 Mar 2019 10:13:39 +0100 (STD) From: Johannes Schindelin X-X-Sender: virtualbox@gitforwindows.org To: =?UTF-8?Q?Nguy=E1=BB=85n_Th=C3=A1i_Ng=E1=BB=8Dc_Duy?= cc: git@vger.kernel.org, Junio C Hamano , Elijah Newren Subject: Re: [PATCH v1 09/11] t: add tests for restore In-Reply-To: <20190308101655.9767-10-pclouds@gmail.com> Message-ID: References: <20190308101655.9767-1-pclouds@gmail.com> <20190308101655.9767-10-pclouds@gmail.com> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-543548457-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P0aDeLU809tjLRU2oj9Edx4E14zgyNJgHX9zWXvzJe5/9GcZPBW Nx4bYBFyValbRmo1+98um3OEDwIA25MmxKn4CU9eYhevj5y8KiDJfRTDVLNjqVxv+nt600gH/ Pqp5BoNAJMjWT4QnTWIv/v+sS8dJtal9sDMUxGmVXriZP8SxnL2CmQ/y0gKUDR0NFgturZvmM hZjVqyW3KjA== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-543548457-1552468435=:41 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Hi Duy, On Fri, 8 Mar 2019, Nguyễn Thái Ngọc Duy wrote: > diff --git a/t/t2070-restore.sh b/t/t2070-restore.sh > new file mode 100755 > index 0000000000..df91bf54bc > --- /dev/null > +++ b/t/t2070-restore.sh > @@ -0,0 +1,77 @@ > +#!/bin/sh > + > +test_description='restore basic functionality' > + > +. ./test-lib.sh > + > +test_expect_success 'setup' ' > + test_commit first && > + echo first-and-a-half >>first.t && > + git add first.t && > + test_commit second && > + echo one >one && > + echo two >two && > + echo untracked >untracked && > + echo ignored >ignored && > + echo /ignored >.gitignore && > + git add one two .gitignore && > + git update-ref refs/heads/one master > +' > + > +test_expect_success 'restore without pathspec is not ok' ' > + test_must_fail git restore && > + test_must_fail git restore --source=first > +' > + > +test_expect_success 'restore -p without pathspec is fine' ' > + echo q >cmd && > + git restore -p +' This breaks with NO_PERL builds. See e.g. https://dev.azure.com/gitgitgadget/git/_build/results?buildId=4581 https://dev.azure.com/gitgitgadget/git/_build/results?buildId=4584 https://dev.azure.com/git/git/_build/results?buildId=386 You need this squashed in: diff --git a/t/t2070-restore.sh b/t/t2070-restore.sh index df91bf54bc06..f4766544c5de 100755 --- a/t/t2070-restore.sh +++ b/t/t2070-restore.sh @@ -23,7 +23,7 @@ test_expect_success 'restore without pathspec is not ok' ' test_must_fail git restore --source=first ' -test_expect_success 'restore -p without pathspec is fine' ' +test_expect_success PERL 'restore -p without pathspec is fine' ' echo q >cmd && git restore -p