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 D55AB1F462 for ; Thu, 25 Jul 2019 10:11:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388814AbfGYKLZ (ORCPT ); Thu, 25 Jul 2019 06:11:25 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:38837 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388564AbfGYKLW (ORCPT ); Thu, 25 Jul 2019 06:11:22 -0400 Received: by mail-wm1-f68.google.com with SMTP id s15so22835576wmj.3 for ; Thu, 25 Jul 2019 03:11:21 -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=rPjjuxUAFqGC56EbsBer9zgdLNLAF/xY3UD9zzLTYRM=; b=hUmg7edf+hpOlJMvrRKV7coWouBV/l5oGP8PETWiLTaWYLQxajpfMVBI6x24cSH9n5 VNkAtVJQp1EFl9IUEYmyKzd5JMS3y9nx/XFQL9ZsVN7tD6Q0wWSY9pTmIEPZoR+PSkJQ V0sFkcwV7h8HPYo3Fcd79DO0DToQDhwwwyAl+qE20JFgTUEIoXbOM4jDV1OVZIKq/6sf WizRZLZglWgjuj6Xmk+0E20u2S/FyNfFj+NOMj9pdbKww/0NelnNrg5yZYq4KIP7wfEe aPvso2GUq91dSogyJegu7HwEpU6/mmseQZmdAQ7DrLMEvSdAufSGJZSt+pOiDN3TkobA BU0w== 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=rPjjuxUAFqGC56EbsBer9zgdLNLAF/xY3UD9zzLTYRM=; b=Een61x3sM+FAy4PEpApzKnAM0NQgWofKD0O3hGWfTtmHPn9Dj8T622s1ho+og0xksM z4CWgFebVUVCznVswewwh9MZotkckQEELZNPFcFzq0tluOYe7MK3rZ986wvooUPae25y EH9lXjSPKU0aMyBME+gMtKgyGTfqMwjQGYAPzNiEcDqHvfH/mJ/rQDVCphnyD07CGJWb AGQgGz+M5UY2hdkQ8pWy+mtvS30x8hXZzc+aB3OdIEywN2vy9ht0OkzFttBrE0gwIIjv 7xb0BmKomzJgsMXOvk2nvGWktZcSmAS8qPaXI5JZI85Mb2t0tk4dNv9QnJ13McBuPVZ2 vSLg== X-Gm-Message-State: APjAAAXlH5F+ve9UvNpMGS5uPzih22rXi8/a2+HO3eAa9QpCs68oMVd6 GW958F45prWo86u925w0UIB084uH X-Google-Smtp-Source: APXvYqytQGVd5RR/wNXUx/IqqEIi9u7RS132dFpnvWn4UhZ65TzTTC8K2M+6Llfal2NxN3kXWzd+oA== X-Received: by 2002:a1c:a6d3:: with SMTP id p202mr80836704wme.26.1564049480665; Thu, 25 Jul 2019 03:11:20 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id b8sm62551862wmh.46.2019.07.25.03.11.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 03:11:20 -0700 (PDT) Date: Thu, 25 Jul 2019 03:11:20 -0700 (PDT) X-Google-Original-Date: Thu, 25 Jul 2019 10:11:08 GMT Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Subject: [PATCH 07/12] 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: 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 b490919c60..c0ff3241e4 100755 --- a/t/t3427-rebase-subtree.sh +++ b/t/t3427-rebase-subtree.sh @@ -82,11 +82,12 @@ test_expect_failure 'Rebase -Xsubtree --keep-empty --preserve-merges --onto comm 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