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=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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 6A0AB1F731 for ; Wed, 31 Jul 2019 15:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729184AbfGaPTE (ORCPT ); Wed, 31 Jul 2019 11:19:04 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42691 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728668AbfGaPSt (ORCPT ); Wed, 31 Jul 2019 11:18:49 -0400 Received: by mail-wr1-f68.google.com with SMTP id x1so20220672wrr.9 for ; Wed, 31 Jul 2019 08:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:in-reply-to:references:from:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=9uCJ45rpJMctuhqL56/hmO05uhWSAP1DHrSH1OTMAng=; b=NTkow+88t49FKC/2U5Zcl4iuxfuWXowocDXZHb9v/U///7sesP2P4aWRwLbsO1PbTL ujGZgmKhYEaNXwiRRe4SzMqjyU/8cHIcmLfp0WOrl7C+Ou56gyzry46jos37jJBEATS8 Ws0MDFO0YpxVONe0KUmcpn9P+vC3v7gCLcag61GSufuNgu8R1Te29orAqJg6dztFd1k5 9CqGTvXyArGqqlUba7N5bqcmSXzc1vdcfYtTR5Y72yCfUVXCw+TWfGSnGseKoNXyCn63 w1gveS2GnKs5xhhjPiu1+0xGRKyPiCdgPdUWRdmMcD4q2bg8jECbfK/kdFRXhQSrDMxv 4TaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:in-reply-to:references:from :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=9uCJ45rpJMctuhqL56/hmO05uhWSAP1DHrSH1OTMAng=; b=P/7LeNjoLBYXvn7wStFls9X2ijY2nmhUMo3Vlzj/Vo/bTS9wE++0pJL0kafLKIijSf OFqo+8+6EdcoOcfeSsVxqb6m7DhrC90JJPjDwURFls4GD8dvsFoue9EArrIK0c/VmmVe y+ocCfYt9MEHjsHPXWPfC8tDLq6klBJH8NPN7UJ9jQ0orWDTqPpqR0lU49F00PtN62LL brElF6w5brkHYMcvFhW6eV/bfj/LCZlQUtUTaYs4p3Y2h0E9AmO6qJp+jDwc+uzcMyUM khvT1Uc/lb7xLs8UUY9ChsQ3rknU59uy4IC1lsfOJzBqkrc7rMSNJTg+5CdZl3DD7iYq mMAQ== X-Gm-Message-State: APjAAAU4Dv7H0j1tuAtIH4BCxr51a2LlXer6tQivHT7MFatT0Sp45X2Q pK6me/UZid3t7sE/a9xYQrjdwZdU X-Google-Smtp-Source: APXvYqx1otaxc7GBXykDDou4Q1I2swpzr51CObYAe12s5VLJ9YBXM7LqK0Y2//qEgNcUASOLSDGIAg== X-Received: by 2002:adf:a344:: with SMTP id d4mr59012617wrb.237.1564586327161; Wed, 31 Jul 2019 08:18:47 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id x17sm50823871wrq.64.2019.07.31.08.18.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Jul 2019 08:18:46 -0700 (PDT) Date: Wed, 31 Jul 2019 08:18:46 -0700 (PDT) X-Google-Original-Date: Wed, 31 Jul 2019 15:18:32 GMT Message-Id: <57c63309bfaf1198fbf70c9dd992f36d9323dfcf.1564586316.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH v2 12/16] t3427: fix another incorrect assumption Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: git@vger.kernel.org Cc: "brian m. carlson" , Junio C Hamano , Johannes Schindelin Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin The test case that concerns `git rebase -Xsubtree` (with the default rebase backend, not with `--preserve-merges`) starts out with a pre-rebase commit history that begins with a commit that introduces three files: master1.t, master2.t and master3.t. This commit was generated by passing a subtree merge commit through `git filter-branch --subdirectory-filter`, so it looks as if this commit really introduces all those files. The commit history onto which this commit is then rebased, however, introduced those files in individual commits. For that reason, the rebase will fail, it _must_ fail, because the first `pick` results in no changes to be committed. Let's fix the test case to expect exactly this situation. With this change, we can mark the original bug that this test case tried to demonstrate as fixed. Signed-off-by: Johannes Schindelin --- t/t3427-rebase-subtree.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/t3427-rebase-subtree.sh b/t/t3427-rebase-subtree.sh index a734716ea3..7a37235768 100755 --- a/t/t3427-rebase-subtree.sh +++ b/t/t3427-rebase-subtree.sh @@ -82,11 +82,12 @@ test_expect_failure REBASE_P 'Rebase -Xsubtree --keep-empty --preserve-merges -- verbose test "$(commit_message HEAD)" = "Empty commit" ' -# FAILURE: fatal: Could not parse object -test_expect_failure 'Rebase -Xsubtree --keep-empty --onto commit' ' +test_expect_success 'Rebase -Xsubtree --keep-empty --onto commit' ' reset_rebase && git checkout -b rebase-onto to-rebase && - git rebase -Xsubtree=files_subtree --keep-empty --onto files-master master && + test_must_fail git rebase -Xsubtree=files_subtree --keep-empty --onto files-master master && + : first pick results in no changes && + git rebase --continue && verbose test "$(commit_message HEAD~2)" = "master4" && verbose test "$(commit_message HEAD~)" = "files_subtree/master5" && verbose test "$(commit_message HEAD)" = "Empty commit" -- gitgitgadget