From patchwork Mon Jun 24 18:13:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?SZEDER_G=C3=A1bor?= X-Patchwork-Id: 11013911 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 403D41398 for ; Mon, 24 Jun 2019 18:13:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 345A328BB7 for ; Mon, 24 Jun 2019 18:13:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28A1C28BC1; Mon, 24 Jun 2019 18:13:31 +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 7BCCF28BB7 for ; Mon, 24 Jun 2019 18:13:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731903AbfFXSN3 (ORCPT ); Mon, 24 Jun 2019 14:13:29 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43584 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731826AbfFXSN2 (ORCPT ); Mon, 24 Jun 2019 14:13:28 -0400 Received: by mail-wr1-f66.google.com with SMTP id p13so14897753wru.10 for ; Mon, 24 Jun 2019 11:13:27 -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=BGcojx7+3HUj12ltHR1P2b7XaEPWcyBj+x8DgkICdzI=; b=J5iLihZZUkeYGJtPNNKTM4OuiQkik3KGqTiIYSLgKiOtkGaodoDD4+no0flaNKw+ry H6DNu7FDPIy8iG8AkCMPNSP4cYLOQ8uzQQl0klsuP995VCR2on65XKKAQ/cnKjb71bhg a4zsaiRCZLix224nLgJgy9eNQhrrUs4txzdrd/kHwVUZNaw4mi6vbrF6HFi035x6FbKR uQoD8tmFaxT8RMSsftu5DrEgSrdyxCuvVni69+dy+zS3SgbqzJePEgYIzKqq4zxB4MDg EDbAeNgGbMFhCosVRaj4pbLl4WJvpoSyWE+97DEsWNug2Zy3OdX+Se6PswFtgrQLzr7A atGg== 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=BGcojx7+3HUj12ltHR1P2b7XaEPWcyBj+x8DgkICdzI=; b=J4/lPFfCIJ6HX7PiMiYoZygSutQ+m1JJhffzL3Hc5PIC74jRlLdRtbckg+FyXAWuiN s4Qx4AwZ3q0A+vYENfNI8KLxB+Fzp8/qt8nCiPySGha10yVEHoX6uoFRw5ApAPkGmZwl vNk3l/riTFhINz9reGJuIJkFAoj27Zto3TEyHQyU2MuLQPJbvp4i8UI7dpaq6di39Psv G6feCf+u+Q9FpaVAhesY7LreRZ6GEh2vkLSp/Zk5/Pc3/UolDG/KWVJ3c9xBI83cVs+C C+EZGjZADn5MvqdZ5xiJLT9EZ3I70jOWH8bG9MEmNNq40vkaZci0ffaYELg6OOM0J+gs 3+IQ== X-Gm-Message-State: APjAAAXEun2+nbiXbmnOeOuidZPKi8fmBIGWaJ4dGasOVB5ibHahle9w gF8sdmW2xy8quBcVTxG534TMnibs X-Google-Smtp-Source: APXvYqxH2EDYvr5nqhnT0asHr+///s2GodiOCV905I7Jg/kmMJAoHWeDfq7CCHkWuEWVmYvlSNG7nw== X-Received: by 2002:adf:f246:: with SMTP id b6mr52559305wrp.92.1561400007193; Mon, 24 Jun 2019 11:13:27 -0700 (PDT) Received: from localhost.localdomain (x4db9a89d.dyn.telefonica.de. [77.185.168.157]) by smtp.gmail.com with ESMTPSA id v65sm401349wme.31.2019.06.24.11.13.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Jun 2019 11:13:26 -0700 (PDT) From: =?utf-8?q?SZEDER_G=C3=A1bor?= To: Junio C Hamano Cc: Johannes Schindelin , git@vger.kernel.org, =?utf-8?q?SZEDER_G=C3=A1bor?= Subject: [PATCH v3 2/5] t3404: make the 'rebase.missingCommitsCheck=ignore' test more focused Date: Mon, 24 Jun 2019 20:13:15 +0200 Message-Id: <20190624181318.17388-3-szeder.dev@gmail.com> X-Mailer: git-send-email 2.22.0.589.g5bd7971b91 In-Reply-To: <20190624181318.17388-1-szeder.dev@gmail.com> References: <20190611130320.18499-1-szeder.dev@gmail.com> <20190624181318.17388-1-szeder.dev@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 The test 'rebase -i respects rebase.missingCommitsCheck = warn' is mainly interested in the warning about the dropped commits, but it checks the whole output of 'git rebase', including progress lines and what not that are not at all relevant to 'rebase.missingCommitsCheck', but make it necessary to update this test whenever e.g. the way we show progress is updated (as it will happen in one of the later patches of this series). Modify the test to verify only the first four lines of 'git rebase's output that contain all the important lines, notably the line containing the "Warning:" itself and the oneline log of the dropped commit. Signed-off-by: SZEDER Gábor --- t/t3404-rebase-interactive.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 9146f9d47b..0b8267c97c 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1299,32 +1299,19 @@ test_expect_success 'rebase -i respects rebase.missingCommitsCheck = ignore' ' actual ' -cr_to_nl () { - tr '\015' '\012' -} - test_expect_success 'rebase -i respects rebase.missingCommitsCheck = warn' ' cat >expect <<-EOF && Warning: some commits may have been dropped accidentally. Dropped commits (newer to older): - $(git rev-list --pretty=oneline --abbrev-commit -1 master) To avoid this message, use "drop" to explicitly remove a commit. - - Use '\''git config rebase.missingCommitsCheck'\'' to change the level of warnings. - The possible behaviours are: ignore, warn, error. - - Rebasing (1/4) - Rebasing (2/4) - Rebasing (3/4) - Rebasing (4/4) - Successfully rebased and updated refs/heads/missing-commit. EOF test_config rebase.missingCommitsCheck warn && rebase_setup_and_clean missing-commit && set_fake_editor && FAKE_LINES="1 2 3 4" \ git rebase -i --root 2>actual.2 && - cr_to_nl actual && + head -n4 actual.2 >actual && test_i18ncmp expect actual && test D = $(git cat-file commit HEAD | sed -ne \$p) '