From patchwork Sat Aug 8 17:01:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706395 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0097138A for ; Sat, 8 Aug 2020 17:01:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D795206D8 for ; Sat, 8 Aug 2020 17:01:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uVmU6n37" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbgHHRBh (ORCPT ); Sat, 8 Aug 2020 13:01:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726316AbgHHRB1 (ORCPT ); Sat, 8 Aug 2020 13:01:27 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DB2EC061A28 for ; Sat, 8 Aug 2020 10:01:26 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id d190so4209011wmd.4 for ; Sat, 08 Aug 2020 10:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=vXcIDcErW5K6bwHt8cGbpSJBaXJwRTjPuHEfroX0Bv8=; b=uVmU6n37ItGQ06ucgHEJEFpDFVmgXpOkZLKolaR7kh9iOPYDfgRqpjBOHj0NfoDn31 Rv4/UR+l4KCUaucSf9WczfD7b9R5vngMUI8ZW/WLNP14AaeRofvassH4U5S4uOTQ9SuR qY/0gtd1e6SnrG/4u7FSqyUSLtJx9y5DPHGgSirpwVDr1hnjbK2QZtbYKJyEgZmgYzQs jDNn4DYGt2wbv4Q6rgGcLgD7L2gMvHEw7Em2bZjz1GesO2+F5sPUToYmM+F2YHBNoRqv svk5a0JmPEcS6Z/a51F7e86UES1nkgzZdrrGDDAYswWtPT0k3QKgg0dr7nbleVFQJaS5 bGUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=vXcIDcErW5K6bwHt8cGbpSJBaXJwRTjPuHEfroX0Bv8=; b=dv4e/VF+yL7gTsAbOx8x2sQEL3y+d3ftcdyi02lJbcsk2MeEWyGOjnCYz8IMP+KEDD +AYML+s2esxD5N0h4Opv99QVoPC/iDCjEjfgl9MVzUcHUiUp7MrF5FhLJ71NexPgOeqU EqUpnD9O/PWwCtyhgFePU/+qd7ad4GV502NEDsuy/B8z5daJDsaj2wfd6SKOr2lBSu2e 2h1TY/Y9P4jIr6lOC+Cpt4tk+HMsiiWhvyTz5g61OHMagNaMewDtd2GV9HhskDzHm0ZF cGctvO01maCukQEvWLuoWSVzHlNBn91qRV4f9YDZjIXWR2okQBg0OVhKFiFBfj9uljAt btjw== X-Gm-Message-State: AOAM531hBmHok/AXoFkmSTZJQyn+4/irxJe41EIaAhH3sD5Y6JFcOQlZ +S0Eg9EGZG9kfAurJGn3an3dVimx X-Google-Smtp-Source: ABdhPJzzopUwAQKkMQPGqK3MUDpGVqtLWlYGjJDwgK56zfpUpEAL8SU7ok6XfOPymCOJL+5akj0Q+w== X-Received: by 2002:a7b:c0d3:: with SMTP id s19mr17568534wmh.84.1596906083826; Sat, 08 Aug 2020 10:01:23 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id d7sm15202855wra.29.2020.08.08.10.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:22 -0700 (PDT) Message-Id: <3a2b7e9743af01efaf85cf1b8046d6e716ae77af.1596906081.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:10 +0000 Subject: [PATCH v2 01/11] Collect merge-related tests to t64xx Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren The tests for the merge machinery are spread over several places. Collect them into t64xx for simplicity. Some notes: t60[234]*.sh: Merge tests started in t602*, overgrew bisect and remote tracking tests in t6030, t6040, and t6041, and nearly overtook replace tests in t6050. This made picking out relevant tests that I wanted to run in a tighter loop slightly more annoying for years. t303*.sh: These started out as tests for the 'merge-recursive' toplevel command, but did not restrict to that and had lots of overlap with the underlying merge machinery. t7405, t7613: submodule-specific merge logic started out in submodule.c but was moved to merge-recursive.c in commit 18cfc08866 ("submodule.c: move submodule merging to merge-recursive.c", 2018-05-15). Since these tests are about the logic found in the merge machinery, moving these tests to be with the merge tests makes sense. t7607, t7609: Having tests spread all over the place makes it more likely that additional tests related to a certain piece of logic grow in all those other places. Much like t303*.sh, these two tests were about the underlying merge machinery rather than outer levels. Tests that were NOT moved: t76[01]*.sh: Other than the four tests mentioned above, the remaining tests in t76[01]*.sh are related to non-recursive merge strategies, parameter parsing, and other stuff associated with the highlevel builtin/merge.c rather than the recursive merge machinery. t3[45]*.sh: The rebase testcases in t34*.sh also test the merge logic pretty heavily; sometimes changes I make only trigger failures in the rebase tests. The rebase tests are already nicely coupled together, though, and I didn't want to mess that up. Similar comments apply for the cherry-pick tests in t35*.sh. Signed-off-by: Elijah Newren --- t/{t6020-merge-df.sh => t6400-merge-df.sh} | 0 t/{t6021-merge-criss-cross.sh => t6401-merge-criss-cross.sh} | 0 t/{t6022-merge-rename.sh => t6402-merge-rename.sh} | 0 t/{t6023-merge-file.sh => t6403-merge-file.sh} | 0 t/{t6024-recursive-merge.sh => t6404-recursive-merge.sh} | 0 t/{t6025-merge-symlinks.sh => t6405-merge-symlinks.sh} | 0 t/{t6026-merge-attr.sh => t6406-merge-attr.sh} | 0 t/{t6027-merge-binary.sh => t6407-merge-binary.sh} | 0 t/{t6028-merge-up-to-date.sh => t6408-merge-up-to-date.sh} | 0 t/{t6029-merge-subtree.sh => t6409-merge-subtree.sh} | 0 t/{t6031-merge-filemode.sh => t6411-merge-filemode.sh} | 0 t/{t6032-merge-large-rename.sh => t6412-merge-large-rename.sh} | 0 t/{t6033-merge-crlf.sh => t6413-merge-crlf.sh} | 0 ...6034-merge-rename-nocruft.sh => t6414-merge-rename-nocruft.sh} | 0 ...6035-merge-dir-to-symlink.sh => t6415-merge-dir-to-symlink.sh} | 0 ...-recursive-corner-cases.sh => t6416-recursive-corner-cases.sh} | 0 t/{t6037-merge-ours-theirs.sh => t6417-merge-ours-theirs.sh} | 0 t/{t6038-merge-text-auto.sh => t6418-merge-text-auto.sh} | 0 t/{t6039-merge-ignorecase.sh => t6419-merge-ignorecase.sh} | 0 ...-rename-corner-cases.sh => t6422-merge-rename-corner-cases.sh} | 0 ...ge-rename-directories.sh => t6423-merge-rename-directories.sh} | 0 ...ed-index-changes.sh => t6424-merge-unrelated-index-changes.sh} | 0 t/{t6045-merge-rename-delete.sh => t6425-merge-rename-delete.sh} | 0 ...p-unneeded-updates.sh => t6426-merge-skip-unneeded-updates.sh} | 0 ...-diff3-conflict-markers.sh => t6427-diff3-conflict-markers.sh} | 0 t/{t3030-merge-recursive.sh => t6430-merge-recursive.sh} | 0 t/{t3031-merge-criscross.sh => t6431-merge-criscross.sh} | 0 ...ve-space-options.sh => t6432-merge-recursive-space-options.sh} | 0 t/{t3033-merge-toplevel.sh => t6433-merge-toplevel.sh} | 0 ...-rename-options.sh => t6434-merge-recursive-rename-options.sh} | 0 t/{t3035-merge-sparse.sh => t6435-merge-sparse.sh} | 0 t/{t7607-merge-overwrite.sh => t6436-merge-overwrite.sh} | 0 t/{t7405-submodule-merge.sh => t6437-submodule-merge.sh} | 0 ...e-submodule.sh => t6438-submodule-directory-file-conflicts.sh} | 0 t/{t7609-merge-co-error-msgs.sh => t6439-merge-co-error-msgs.sh} | 0 35 files changed, 0 insertions(+), 0 deletions(-) rename t/{t6020-merge-df.sh => t6400-merge-df.sh} (100%) rename t/{t6021-merge-criss-cross.sh => t6401-merge-criss-cross.sh} (100%) rename t/{t6022-merge-rename.sh => t6402-merge-rename.sh} (100%) rename t/{t6023-merge-file.sh => t6403-merge-file.sh} (100%) rename t/{t6024-recursive-merge.sh => t6404-recursive-merge.sh} (100%) rename t/{t6025-merge-symlinks.sh => t6405-merge-symlinks.sh} (100%) rename t/{t6026-merge-attr.sh => t6406-merge-attr.sh} (100%) rename t/{t6027-merge-binary.sh => t6407-merge-binary.sh} (100%) rename t/{t6028-merge-up-to-date.sh => t6408-merge-up-to-date.sh} (100%) rename t/{t6029-merge-subtree.sh => t6409-merge-subtree.sh} (100%) rename t/{t6031-merge-filemode.sh => t6411-merge-filemode.sh} (100%) rename t/{t6032-merge-large-rename.sh => t6412-merge-large-rename.sh} (100%) rename t/{t6033-merge-crlf.sh => t6413-merge-crlf.sh} (100%) rename t/{t6034-merge-rename-nocruft.sh => t6414-merge-rename-nocruft.sh} (100%) rename t/{t6035-merge-dir-to-symlink.sh => t6415-merge-dir-to-symlink.sh} (100%) rename t/{t6036-recursive-corner-cases.sh => t6416-recursive-corner-cases.sh} (100%) rename t/{t6037-merge-ours-theirs.sh => t6417-merge-ours-theirs.sh} (100%) rename t/{t6038-merge-text-auto.sh => t6418-merge-text-auto.sh} (100%) rename t/{t6039-merge-ignorecase.sh => t6419-merge-ignorecase.sh} (100%) rename t/{t6042-merge-rename-corner-cases.sh => t6422-merge-rename-corner-cases.sh} (100%) rename t/{t6043-merge-rename-directories.sh => t6423-merge-rename-directories.sh} (100%) rename t/{t6044-merge-unrelated-index-changes.sh => t6424-merge-unrelated-index-changes.sh} (100%) rename t/{t6045-merge-rename-delete.sh => t6425-merge-rename-delete.sh} (100%) rename t/{t6046-merge-skip-unneeded-updates.sh => t6426-merge-skip-unneeded-updates.sh} (100%) rename t/{t6047-diff3-conflict-markers.sh => t6427-diff3-conflict-markers.sh} (100%) rename t/{t3030-merge-recursive.sh => t6430-merge-recursive.sh} (100%) rename t/{t3031-merge-criscross.sh => t6431-merge-criscross.sh} (100%) rename t/{t3032-merge-recursive-space-options.sh => t6432-merge-recursive-space-options.sh} (100%) rename t/{t3033-merge-toplevel.sh => t6433-merge-toplevel.sh} (100%) rename t/{t3034-merge-recursive-rename-options.sh => t6434-merge-recursive-rename-options.sh} (100%) rename t/{t3035-merge-sparse.sh => t6435-merge-sparse.sh} (100%) rename t/{t7607-merge-overwrite.sh => t6436-merge-overwrite.sh} (100%) rename t/{t7405-submodule-merge.sh => t6437-submodule-merge.sh} (100%) rename t/{t7613-merge-submodule.sh => t6438-submodule-directory-file-conflicts.sh} (100%) rename t/{t7609-merge-co-error-msgs.sh => t6439-merge-co-error-msgs.sh} (100%) diff --git a/t/t6020-merge-df.sh b/t/t6400-merge-df.sh similarity index 100% rename from t/t6020-merge-df.sh rename to t/t6400-merge-df.sh diff --git a/t/t6021-merge-criss-cross.sh b/t/t6401-merge-criss-cross.sh similarity index 100% rename from t/t6021-merge-criss-cross.sh rename to t/t6401-merge-criss-cross.sh diff --git a/t/t6022-merge-rename.sh b/t/t6402-merge-rename.sh similarity index 100% rename from t/t6022-merge-rename.sh rename to t/t6402-merge-rename.sh diff --git a/t/t6023-merge-file.sh b/t/t6403-merge-file.sh similarity index 100% rename from t/t6023-merge-file.sh rename to t/t6403-merge-file.sh diff --git a/t/t6024-recursive-merge.sh b/t/t6404-recursive-merge.sh similarity index 100% rename from t/t6024-recursive-merge.sh rename to t/t6404-recursive-merge.sh diff --git a/t/t6025-merge-symlinks.sh b/t/t6405-merge-symlinks.sh similarity index 100% rename from t/t6025-merge-symlinks.sh rename to t/t6405-merge-symlinks.sh diff --git a/t/t6026-merge-attr.sh b/t/t6406-merge-attr.sh similarity index 100% rename from t/t6026-merge-attr.sh rename to t/t6406-merge-attr.sh diff --git a/t/t6027-merge-binary.sh b/t/t6407-merge-binary.sh similarity index 100% rename from t/t6027-merge-binary.sh rename to t/t6407-merge-binary.sh diff --git a/t/t6028-merge-up-to-date.sh b/t/t6408-merge-up-to-date.sh similarity index 100% rename from t/t6028-merge-up-to-date.sh rename to t/t6408-merge-up-to-date.sh diff --git a/t/t6029-merge-subtree.sh b/t/t6409-merge-subtree.sh similarity index 100% rename from t/t6029-merge-subtree.sh rename to t/t6409-merge-subtree.sh diff --git a/t/t6031-merge-filemode.sh b/t/t6411-merge-filemode.sh similarity index 100% rename from t/t6031-merge-filemode.sh rename to t/t6411-merge-filemode.sh diff --git a/t/t6032-merge-large-rename.sh b/t/t6412-merge-large-rename.sh similarity index 100% rename from t/t6032-merge-large-rename.sh rename to t/t6412-merge-large-rename.sh diff --git a/t/t6033-merge-crlf.sh b/t/t6413-merge-crlf.sh similarity index 100% rename from t/t6033-merge-crlf.sh rename to t/t6413-merge-crlf.sh diff --git a/t/t6034-merge-rename-nocruft.sh b/t/t6414-merge-rename-nocruft.sh similarity index 100% rename from t/t6034-merge-rename-nocruft.sh rename to t/t6414-merge-rename-nocruft.sh diff --git a/t/t6035-merge-dir-to-symlink.sh b/t/t6415-merge-dir-to-symlink.sh similarity index 100% rename from t/t6035-merge-dir-to-symlink.sh rename to t/t6415-merge-dir-to-symlink.sh diff --git a/t/t6036-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh similarity index 100% rename from t/t6036-recursive-corner-cases.sh rename to t/t6416-recursive-corner-cases.sh diff --git a/t/t6037-merge-ours-theirs.sh b/t/t6417-merge-ours-theirs.sh similarity index 100% rename from t/t6037-merge-ours-theirs.sh rename to t/t6417-merge-ours-theirs.sh diff --git a/t/t6038-merge-text-auto.sh b/t/t6418-merge-text-auto.sh similarity index 100% rename from t/t6038-merge-text-auto.sh rename to t/t6418-merge-text-auto.sh diff --git a/t/t6039-merge-ignorecase.sh b/t/t6419-merge-ignorecase.sh similarity index 100% rename from t/t6039-merge-ignorecase.sh rename to t/t6419-merge-ignorecase.sh diff --git a/t/t6042-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh similarity index 100% rename from t/t6042-merge-rename-corner-cases.sh rename to t/t6422-merge-rename-corner-cases.sh diff --git a/t/t6043-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh similarity index 100% rename from t/t6043-merge-rename-directories.sh rename to t/t6423-merge-rename-directories.sh diff --git a/t/t6044-merge-unrelated-index-changes.sh b/t/t6424-merge-unrelated-index-changes.sh similarity index 100% rename from t/t6044-merge-unrelated-index-changes.sh rename to t/t6424-merge-unrelated-index-changes.sh diff --git a/t/t6045-merge-rename-delete.sh b/t/t6425-merge-rename-delete.sh similarity index 100% rename from t/t6045-merge-rename-delete.sh rename to t/t6425-merge-rename-delete.sh diff --git a/t/t6046-merge-skip-unneeded-updates.sh b/t/t6426-merge-skip-unneeded-updates.sh similarity index 100% rename from t/t6046-merge-skip-unneeded-updates.sh rename to t/t6426-merge-skip-unneeded-updates.sh diff --git a/t/t6047-diff3-conflict-markers.sh b/t/t6427-diff3-conflict-markers.sh similarity index 100% rename from t/t6047-diff3-conflict-markers.sh rename to t/t6427-diff3-conflict-markers.sh diff --git a/t/t3030-merge-recursive.sh b/t/t6430-merge-recursive.sh similarity index 100% rename from t/t3030-merge-recursive.sh rename to t/t6430-merge-recursive.sh diff --git a/t/t3031-merge-criscross.sh b/t/t6431-merge-criscross.sh similarity index 100% rename from t/t3031-merge-criscross.sh rename to t/t6431-merge-criscross.sh diff --git a/t/t3032-merge-recursive-space-options.sh b/t/t6432-merge-recursive-space-options.sh similarity index 100% rename from t/t3032-merge-recursive-space-options.sh rename to t/t6432-merge-recursive-space-options.sh diff --git a/t/t3033-merge-toplevel.sh b/t/t6433-merge-toplevel.sh similarity index 100% rename from t/t3033-merge-toplevel.sh rename to t/t6433-merge-toplevel.sh diff --git a/t/t3034-merge-recursive-rename-options.sh b/t/t6434-merge-recursive-rename-options.sh similarity index 100% rename from t/t3034-merge-recursive-rename-options.sh rename to t/t6434-merge-recursive-rename-options.sh diff --git a/t/t3035-merge-sparse.sh b/t/t6435-merge-sparse.sh similarity index 100% rename from t/t3035-merge-sparse.sh rename to t/t6435-merge-sparse.sh diff --git a/t/t7607-merge-overwrite.sh b/t/t6436-merge-overwrite.sh similarity index 100% rename from t/t7607-merge-overwrite.sh rename to t/t6436-merge-overwrite.sh diff --git a/t/t7405-submodule-merge.sh b/t/t6437-submodule-merge.sh similarity index 100% rename from t/t7405-submodule-merge.sh rename to t/t6437-submodule-merge.sh diff --git a/t/t7613-merge-submodule.sh b/t/t6438-submodule-directory-file-conflicts.sh similarity index 100% rename from t/t7613-merge-submodule.sh rename to t/t6438-submodule-directory-file-conflicts.sh diff --git a/t/t7609-merge-co-error-msgs.sh b/t/t6439-merge-co-error-msgs.sh similarity index 100% rename from t/t7609-merge-co-error-msgs.sh rename to t/t6439-merge-co-error-msgs.sh From patchwork Sat Aug 8 17:01:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706413 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34F2D138A for ; Sat, 8 Aug 2020 17:01:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CFAF206D8 for ; Sat, 8 Aug 2020 17:01:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FRW1EXjl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726550AbgHHRBw (ORCPT ); Sat, 8 Aug 2020 13:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbgHHRB2 (ORCPT ); Sat, 8 Aug 2020 13:01:28 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB5CCC061756 for ; Sat, 8 Aug 2020 10:01:27 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 3so4601343wmi.1 for ; Sat, 08 Aug 2020 10:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=ofr+Hu5Tf6QDtMLwZu0ctJ5oDIF3fKZrk4aVgYXKZ84=; b=FRW1EXjl8rQ9exDkcdfLO1lOLvS7slZEOukup2D5KCJG5ETT7w+C2mxsFb8mHC1AQu M6PBbOc9vDUzguuGKOMh+HKf1c+RMWp4bOg5DnUg56Bej21F+Ck4LvjQoDqlg4T8yFGJ j2PFi0aI1hf5Aptt5uQ7KMBjZjx+yJbTrwAQGU605Gms84VjD3SkD0r5lnYs7FUb2Eg7 0NLxl9iEeKdRMrQtwonORS7U6y4oFYScxOM1p0uzG5Hb26lq7eWuS/0s4GvOqfMci4w8 fATxLWQk2Es8DASBXVzPowXDvOzQyUz7hA4Cq1FL/2vPPo7VJf9IM9JLb/fNWZSyQ0aF pDrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=ofr+Hu5Tf6QDtMLwZu0ctJ5oDIF3fKZrk4aVgYXKZ84=; b=iiJkRR0cvgY3zLPcxkICO/wTgeIU98ZJYicQsi7EXdA16TkpRmOQwyrZP6p7AT1S1P BuwFWsNeFqTjAd375TqXZ/wvmYPrPV8EDIVOCXUYGxQT2KmwPWLp2wPOFOZbtcj0OtbC 40/HZ4SPxh6QMu2Oiu95a96mWKUdv8D3f4vGbW1GrlCdmk1VXcqKOIhPwHLIEpy5El2a aQYKt8X8eh6GCRN2oo8iaO83KdfGeTZVop6bq0fY/30RiIG1SIe+3j2fs8CxYufW2b29 XTD0cZUafzwqv6zeyGDrHkwGQ3vsqVaCr5H3kh3nQBxelxDUS8Stsu/fjrBarj9UKPmV cDAw== X-Gm-Message-State: AOAM530YQvuPTVBw99OEgHj5P42cZdZmTdCOTNMtxRNge0+tnssv/RiL T9IKT+8SozF8jaChtD+EoiqRtRWg X-Google-Smtp-Source: ABdhPJwGu6Nl6ZCbjPPsvjZzaiITxgk82y+drFHFpNo+XxZiPRPPIYkOr3npRaXPPgLYSsAo2qkOCA== X-Received: by 2002:a05:600c:414e:: with SMTP id h14mr8683022wmm.41.1596906085655; Sat, 08 Aug 2020 10:01:25 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o3sm14731083wru.64.2020.08.08.10.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:25 -0700 (PDT) Message-Id: <7f408b7d4069403b969d334f4940ebf87f1dc797.1596906081.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:12 +0000 Subject: [PATCH v2 03/11] t6422: fix bad check against missing file Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren Signed-off-by: Elijah Newren --- t/t6422-merge-rename-corner-cases.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh index f163893ff9..7da75c1736 100755 --- a/t/t6422-merge-rename-corner-cases.sh +++ b/t/t6422-merge-rename-corner-cases.sh @@ -906,7 +906,7 @@ test_expect_failure 'rad-check: rename/add/delete conflict' ' git rev-parse >expect \ B:bar A:bar && - test_cmp file_is_missing foo && + test_path_is_missing foo && # bar should have two-way merged contents of the different # versions of bar; check that content from both sides is # present. @@ -974,8 +974,8 @@ test_expect_failure 'rrdd-check: rename/rename(2to1)/delete/delete conflict' ' git rev-parse >expect \ O:foo O:bar && - test_cmp file_is_missing foo && - test_cmp file_is_missing bar && + test_path_is_missing foo && + test_path_is_missing bar && # baz should have two-way merged contents of the original # contents of foo and bar; check that content from both sides # is present. From patchwork Sat Aug 8 17:01:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706397 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1F754722 for ; Sat, 8 Aug 2020 17:01:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07177206CD for ; Sat, 8 Aug 2020 17:01:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V/ZOsx7G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbgHHRBj (ORCPT ); Sat, 8 Aug 2020 13:01:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbgHHRB3 (ORCPT ); Sat, 8 Aug 2020 13:01:29 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C695CC061A29 for ; Sat, 8 Aug 2020 10:01:28 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id f12so4407104wru.13 for ; Sat, 08 Aug 2020 10:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=0vMZt73qbmIoI+rhDiNsvrAu1kWR485QNPmx86vZ0PU=; b=V/ZOsx7GnkdgAvQnuh85Px/ijZS2cIW1lQJ41LdpGm2Tp6avMYnb+OVTE9lQAyKXQF FetvYnnbDJCMgItQLVcY0Jzy037FTNwlipUA4ev4Ol6huj+3cutEfMW3aeao711QAwvV 5nDhtbgfDz9LullQJurafHh/MFSSnuk+YGkQ1jWSe7e+iVrTNpgz8zmJtUCVEfHrQ3Q+ udSBIJpN0wFc7Xp7GuC9kl+w9LXwubsOaWhr10UmHkaHpWkkCUtRb+G5vFYaV2nb5Pdh 2S0JtLCJ8j/jchyj+mbOLP56d5ff7yM/u60lS4779HML0v8EsgNgoPihm/TX04PEXBSF D+nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=0vMZt73qbmIoI+rhDiNsvrAu1kWR485QNPmx86vZ0PU=; b=Tb+8tEOsVOn1tuPAGZ1UUNmhvylIxlWEm1R3Udt55rgNvpoWqSGbYRJEjVxwHWONGc uTUo2vb+GvjQpLPCaSFpbZ8mW3ZlrKvs73j1ErNbUYn0BABHUOckwWFKBE8Qohl6H54t TfCDN5l0WXXcoIIAnlRqcUU7z//GvaihYlyzxhZwGl+MBCSjjg8Sqypwh3nVhhgv6txj OizVctq5F3Ne5RruYs2VBcadsrS/p2uA73a1W21ejeNcEGIDdYpTsKx5lMuqWIEHEO2c WjKt3UehGSNCD7DwvLiiLLyQNhmPUY1IxS2xEgxhd3voZ32DU60JHGZbBFBECV6kCKpD 1j8A== X-Gm-Message-State: AOAM530ORPGZJww4HNrF74xnRjcXabVFNZTEBSiNexPzMZT+/7FIetX8 AXvjhsNEKRxqg8syWOWvN2FrkLwk X-Google-Smtp-Source: ABdhPJxOAarwlsZfOTkw4Zf6bTxQwFfodic7D5MPISK8WKgqiHaFxXs2zT7O+xUoxqmiR5rSk9mqYw== X-Received: by 2002:a5d:60c5:: with SMTP id x5mr17530979wrt.67.1596906086408; Sat, 08 Aug 2020 10:01:26 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id m1sm13985725wmc.28.2020.08.08.10.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:26 -0700 (PDT) Message-Id: <9ce80f2f943278fcb8ef46fd1a9507d832657246.1596906081.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:13 +0000 Subject: [PATCH v2 04/11] t6416, t6422: fix incorrect untracked file count Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren Apparently I don't know how to count untracked files, and since the tests in question were marked as test_expect_failure, no one every noticed it until know. Correct the count, as these tests clearly creates three untracked files ('out', 'err', and 'file_count'). (I believe this problem arose because earlier incarnations counted lines via a pipe to 'wc -l'. Reviewers asked that it be replaced by writing the output to a file and using test_line_count, but when the temporary output was added to a separate file, the count of untracked files should have increased.) Signed-off-by: Elijah Newren --- t/t6416-recursive-corner-cases.sh | 2 +- t/t6422-merge-rename-corner-cases.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh index b3bf462617..d272b418e4 100755 --- a/t/t6416-recursive-corner-cases.sh +++ b/t/t6416-recursive-corner-cases.sh @@ -1144,7 +1144,7 @@ test_expect_failure 'check symlink add/add' ' test_must_fail git merge -s recursive E^0 && git ls-files -s >out && - test_line_count = 2 out && + test_line_count = 3 out && git ls-files -u >out && test_line_count = 2 out && git ls-files -o >out && diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh index 7da75c1736..c8ee033ad9 100755 --- a/t/t6422-merge-rename-corner-cases.sh +++ b/t/t6422-merge-rename-corner-cases.sh @@ -899,7 +899,7 @@ test_expect_failure 'rad-check: rename/add/delete conflict' ' git ls-files -u >file_count && test_line_count = 2 file_count && git ls-files -o >file_count && - test_line_count = 2 file_count && + test_line_count = 3 file_count && git rev-parse >actual \ :2:bar :3:bar && @@ -967,7 +967,7 @@ test_expect_failure 'rrdd-check: rename/rename(2to1)/delete/delete conflict' ' git ls-files -u >file_count && test_line_count = 2 file_count && git ls-files -o >file_count && - test_line_count = 2 file_count && + test_line_count = 3 file_count && git rev-parse >actual \ :2:baz :3:baz && From patchwork Sat Aug 8 17:01:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706399 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6680F138A for ; Sat, 8 Aug 2020 17:01:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F18020716 for ; Sat, 8 Aug 2020 17:01:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CEx2le+B" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726510AbgHHRBk (ORCPT ); Sat, 8 Aug 2020 13:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbgHHRB3 (ORCPT ); Sat, 8 Aug 2020 13:01:29 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6FEEC061A27 for ; Sat, 8 Aug 2020 10:01:28 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id k20so4581890wmi.5 for ; Sat, 08 Aug 2020 10:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=v/YrnIQx0Qjh+uN3OIOcV92pi53pOcv0u9rwLWldDJs=; b=CEx2le+Bk1nms7ngUFjqkFWNe0eK4Ex+rIGtHAP7KPWlp3WqIjn+OnZDwpJRJjXi+j WKzYm39FFcJ703lUeemXsNpC6NGlnnlk/kl1h3zKLjODCFEabcODjl6Ls+T2H9iR4onO 8j3QcHdxKPa0qUXfykaqYogjW2xN/yoaPo8o/0iWTZxoxKg1usUkL24OCxkpWuSz1z4O 19xy89AtmficTlBzPfBnI+/J7+HQGcB3GSqmbaLIjVkv1nZ423vlrYjF9HAqFyXEydRI Ic/ArcbsYGFDUfl9hsH6JSfgosGUa/fB9tNjl6PpftcVueYWnmkFDJiAA73R5ktxiUs1 N8mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=v/YrnIQx0Qjh+uN3OIOcV92pi53pOcv0u9rwLWldDJs=; b=AEd70Ya+wNrAiN9wvbzo8R967X0EbPzlElMY0mk1XNeRkr9Xu9OCqb8L4SB2sORbE8 Rdhk9KTEhlJZpHYtG6QH51+b9nSqoGizue0YJVDJ3aDtBwtBQmWXSkCFZrwq0XpxpUsf NzOuwc8mIYpz6vSjfqHSD9/hu9FNOcUN+NjFWlFz6Mi5PErlls2f4a8IPaaLz3o3Coaq e1VDjSgRT0QzmNNSueK8dfeRp5PhioiUss+FZSc9yV9YvsQMKY6aznHTJTZ+yod50CPG Fg5G5GHOFoCL5g86rbiv8PIl4coUOpRutlqMfV306VKT33KEqSM8h5wy8+7mGiSKO+he meUA== X-Gm-Message-State: AOAM530tNrkdn1XvmyVS6MCEO75bhsRDuMkkUbIR2cYehgntZhsaUrKg XnWClUdQGSc2cRgygglnLg7BD1xL X-Google-Smtp-Source: ABdhPJyHB/tIaK6t1FNaYMVtACenRFdCbsDv838gEUwARiMU+Rx9+Dum3lTHW6JIyfGXmjBauBtfOg== X-Received: by 2002:a05:600c:2d1:: with SMTP id 17mr17544935wmn.15.1596906087307; Sat, 08 Aug 2020 10:01:27 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id i9sm14352070wmb.11.2020.08.08.10.01.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:26 -0700 (PDT) Message-Id: <382d65649dc1d8abdd1c3f0f4a4af67f42f43731.1596906081.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:14 +0000 Subject: [PATCH v2 05/11] t6423: fix test setup for a couple tests Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren Commit da1e295e00 ("t604[236]: do not run setup in separate tests", 2019-10-22) removed approximately half the tests (which were setup-only tests) in t6043 by turning them into functions that the subsequent test would call as their first step. This ensured that any test from this file could be run entirely independently of all the other tests in the file. Unfortunately, the call to the new setup function was missed in two of the test_expect_failure cases. Add them in. Signed-off-by: Elijah Newren --- t/t6423-merge-rename-directories.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/t6423-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh index 83792c5ef1..d227e15944 100755 --- a/t/t6423-merge-rename-directories.sh +++ b/t/t6423-merge-rename-directories.sh @@ -2880,6 +2880,7 @@ test_setup_9g () { } test_expect_failure '9g: Renamed directory that only contained immediate subdirs, immediate subdirs renamed' ' + test_setup_9g && ( cd 9g && @@ -3362,6 +3363,7 @@ test_setup_10e () { } test_expect_failure '10e: Does git complain about untracked file that is not really in the way?' ' + test_setup_10e && ( cd 10e && From patchwork Sat Aug 8 17:01:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706411 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B52B4722 for ; Sat, 8 Aug 2020 17:01:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CE4820716 for ; Sat, 8 Aug 2020 17:01:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dbj22Cu4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726542AbgHHRBt (ORCPT ); Sat, 8 Aug 2020 13:01:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbgHHRBa (ORCPT ); Sat, 8 Aug 2020 13:01:30 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1877CC061A28 for ; Sat, 8 Aug 2020 10:01:30 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id r4so4411521wrx.9 for ; Sat, 08 Aug 2020 10:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=i00B2BT4Kn6NDWnpqeIIET1PxK/n8DZQOVdnCgauGS8=; b=dbj22Cu4EBSr6LUvuG36aPzZAYeY/eHYtW5Di01VEEh9jsDFrMBP9vA3BFDBaWUwFL Ub9MB7MJxt9eGdjeXhuycfL0jupABqApWddajrbt9pspTAgEtmEew4yyVy7x1X+tOj/h WiSWqbJNHtnRxBaFsuDJcBsDa96U/RMV//oRXpkwEVCySdx+fA113Res0pmU9Noa781w RFVBrrKm+903rPJcMPuOM2tkLkbzPvHyXd//eIttWvPEXKBdNJHAJeeYNjwHthtb+A78 H4UFb3Gz5RIo5jkHqO39yM4nLDB9zFMsytRTU63x6w8BOxLnWTvlfbz0e0+Ujg+4akmG o3/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=i00B2BT4Kn6NDWnpqeIIET1PxK/n8DZQOVdnCgauGS8=; b=GoVuxlWEm0r99l5c/FFj5sUOopiuUmUHw+MT8WIFBPn0OfSDkETr6aPhWL7Ri37QhM y89DAXq7USRyGcJybAd0FtOFpe8AuX8AqrSiGi50mmEuCeb/MkYbfZveUAH9zcsqtW16 EXukxPg1/wTh/HqHx49SPDiL4KUQ3Az9DBqDW4nQhX6Jx6+RbxLu/jw5s+M7fFmv5rKA L6fv0wRThuCs+oYrMa0jfyFRfqLf4WO/cM1iXGFjoAMxWthcd9GKSBYc8JZdGGwbGG8k lns/iuzJcmfemeaR14aUUyHPXC+1xUtKgrsUjpLFoDlb2zX7mAJ7sc/5VIV917LacBLB zCIg== X-Gm-Message-State: AOAM533NIxXMfiz+asu9tiXrbX/UjbgJ2Jjty/D7Zc2KaiAKPtPJeiH9 36zViiycBBfpCKWeheN6DhYzZocc X-Google-Smtp-Source: ABdhPJyCSbeV/ZZShAAltcW1zjG6d8kuYbwlx88FbVih0ZcWJ6YArdQYp/GUYy7qV+8PnMTut6+vNg== X-Received: by 2002:adf:9361:: with SMTP id 88mr18664386wro.403.1596906088038; Sat, 08 Aug 2020 10:01:28 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 31sm14516799wrj.94.2020.08.08.10.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:27 -0700 (PDT) Message-Id: <56e169b1d8e8b24c89f826c3efe7a4d3ca6ade05.1596906081.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:15 +0000 Subject: [PATCH v2 06/11] t6422: fix multiple errors with the mod6 test expectations Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren This test had multiple issues causing it to fail for the wrong reason(s): * rename/rename(1to2) conflicts have always left the original source path present in the working directory and index (at stage 1). Thus, the triple rename/rename(1to2) should result in 9 unstaged files, not 6. * It messed up the three-way content merge for checking the results of merging for one of the renames, accidentally turning it into a two-way merge. * It got the contents of the base files it was using to compare against wrong, due to an off-by-one error, and overwrite-redirection ('>') instead of append-redirection ('>>'). * It used slightly too-long conflict markers * It didn't include filenames in the conflict marker hunks (granted, that was a shortcoming of the merge-recursive backend for rename/add and rename/rename(2to1) conflicts, but since it's test_expect_failure anyway we might as well make it expect our preferred behavior rather than some compromise that we can't yet reach anyway). Fix these issues so that a merge backend which correctly handles these kinds of nested conflicts will pass the test. Signed-off-by: Elijah Newren --- t/t6422-merge-rename-corner-cases.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh index c8ee033ad9..2413f517e7 100755 --- a/t/t6422-merge-rename-corner-cases.sh +++ b/t/t6422-merge-rename-corner-cases.sh @@ -1042,25 +1042,25 @@ test_expect_failure 'mod6-check: chains of rename/rename(1to2) and rename/rename test_must_be_empty err && git ls-files -s >file_count && - test_line_count = 6 file_count && + test_line_count = 9 file_count && git ls-files -u >file_count && - test_line_count = 6 file_count && + test_line_count = 9 file_count && git ls-files -o >file_count && test_line_count = 3 file_count && test_seq 10 20 >merged-one && test_seq 51 60 >merged-five && # Determine what the merge of three would give us. - test_seq 30 40 >three-side-A && + test_seq 31 39 >three-base && + test_seq 31 40 >three-side-A && test_seq 31 39 >three-side-B && - echo forty >three-side-B && - >empty && + echo forty >>three-side-B && test_must_fail git merge-file \ - -L "HEAD" \ + -L "HEAD:four" \ -L "" \ - -L "B^0" \ - three-side-A empty three-side-B && - sed -e "s/^\([<=>]\)/\1\1\1/" three-side-A >merged-three && + -L "B^0:two" \ + three-side-A three-base three-side-B && + sed -e "s/^\([<=>]\)/\1\1/" three-side-A >merged-three && # Verify the index is as expected git rev-parse >actual \ @@ -1075,6 +1075,7 @@ test_expect_failure 'mod6-check: chains of rename/rename(1to2) and rename/rename git cat-file -p :2:two >expect && git cat-file -p :3:two >other && + >empty && test_must_fail git merge-file \ -L "HEAD" -L "" -L "B^0" \ expect empty other && From patchwork Sat Aug 8 17:01:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706409 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB89B138A for ; Sat, 8 Aug 2020 17:01:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4E3F20716 for ; Sat, 8 Aug 2020 17:01:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QffX0iUb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbgHHRBs (ORCPT ); Sat, 8 Aug 2020 13:01:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbgHHRBa (ORCPT ); Sat, 8 Aug 2020 13:01:30 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7272CC061756 for ; Sat, 8 Aug 2020 10:01:30 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id q76so4583989wme.4 for ; Sat, 08 Aug 2020 10:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=R5WjzEx3d6LDRLe3qK/6OQvPeGsDYxYmhtGaQrPi7Ww=; b=QffX0iUbSPIVNbYGVbpuUw5GRbA9NziK99r7gecWHiS8sniFDbURyEI9geIYMCZpx3 DOA4fztvd+qaliHLNrxiguLVTpi5mSm/RQlc7sJP4iXizG2l5bSToW2mP1HNJrK9D/Nz 51FtCrBxhocb2luFoiey8bGILKlDEuXoNBEmmgPrG3kiRVnk3QYAeGw+6FjKppkUC4Hk LooemMYXL23fFREQDAV9EVJPyD0V9W/eyRowFgpG/HcznJ+PIEF4RFN6TA2YoZs3RN/o oUX6061IQCXZykX84ycsb2byWedroT6jQjj51IFykcT1Mee+JES8ubS9r1H5Ci8lQtTV KCmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=R5WjzEx3d6LDRLe3qK/6OQvPeGsDYxYmhtGaQrPi7Ww=; b=kw0mQrmjyYkhrrn1tMIQRxVf1x0S7pYr6VIc2YXEWq28DHP5Lx2xYYKJ9dNiN/69GB 8lxNMEtN2eJP/6sADuWtl5PoqYEEVHmk2CykvCXNXB8xsH2T/51Aznae4ps3xSF1oPGM rUdzZ6TKFRma+qeEhQ7A4IE9azHTVx0wlIVyxJMw2kUaiHnZSpn43mBXse8fngkmHW8Z wnTrTck3PzHI9RsFZREWdeOmyIB4kgIkrd1CyCf5e/dYo9fJfRxJPDvoAbE8hNwDKZrK fWXu4ICNJNy/l+w/B6FZJwzXbm3IQlImqUYrQ8JvvLS5usUcuEcnpZAcNpNu3JtixnEp tObg== X-Gm-Message-State: AOAM5307/mwzUbnd8W62StK3W7MUiWDQWgaPRh/4/pjaJbTSuN/nQhmu C0WctEhfqkMUGO/o24XmCAUnL3ro X-Google-Smtp-Source: ABdhPJx+juckofQhLhkrf2karyjnWWT5ZvLtG06W61Xbc0SUYGRu1DJ/YpAFmst9QqCi5HdT4FhfFg== X-Received: by 2002:a1c:3c87:: with SMTP id j129mr17520543wma.176.1596906088890; Sat, 08 Aug 2020 10:01:28 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id z6sm15125840wrs.36.2020.08.08.10.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:28 -0700 (PDT) Message-Id: <7b534d123ad77dd4905c0fc9cd5f583f3eb647a7.1596906081.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:16 +0000 Subject: [PATCH v2 07/11] t6416, t6423: clarify some comments and fix some typos Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren Signed-off-by: Elijah Newren --- t/t6416-recursive-corner-cases.sh | 2 +- t/t6423-merge-rename-directories.sh | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/t/t6416-recursive-corner-cases.sh b/t/t6416-recursive-corner-cases.sh index d272b418e4..fd98989b14 100755 --- a/t/t6416-recursive-corner-cases.sh +++ b/t/t6416-recursive-corner-cases.sh @@ -452,7 +452,7 @@ test_expect_success 'git detects conflict merging criss-cross+modify/delete, rev # # So choice 5 at least provides some kind of conflict for the original case, # and can merge cleanly as expected with D1 and E3. It also made things just -# slightly funny for merging D1 and e$, where E4 is defined as: +# slightly funny for merging D1 and E4, where E4 is defined as: # Commit E4: Merge B & C, modifying 'a' and renaming to 'a2', and deleting 'a/' # in this case, we'll get a rename/rename(1to2) conflict because a~$UNIQUE # gets renamed to 'a' in D1 and to 'a2' in E4. But that's better than having diff --git a/t/t6423-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh index d227e15944..bd0f17a3be 100755 --- a/t/t6423-merge-rename-directories.sh +++ b/t/t6423-merge-rename-directories.sh @@ -2260,24 +2260,23 @@ test_expect_success '8d: rename/delete...or not?' ' # Commit B: w/{b,c}, z/d # # Possible Resolutions: -# w/o dir-rename detection: z/d, CONFLICT(z/b -> y/b vs. w/b), -# CONFLICT(z/c -> y/c vs. w/c) -# Currently expected: y/d, CONFLICT(z/b -> y/b vs. w/b), -# CONFLICT(z/c -> y/c vs. w/c) -# Optimal: ?? +# if z not considered renamed: z/d, CONFLICT(z/b -> y/b vs. w/b), +# CONFLICT(z/c -> y/c vs. w/c) +# if z->y rename considered: y/d, CONFLICT(z/b -> y/b vs. w/b), +# CONFLICT(z/c -> y/c vs. w/c) +# Optimal: ?? # # Notes: In commit A, directory z got renamed to y. In commit B, directory z # did NOT get renamed; the directory is still present; instead it is # considered to have just renamed a subset of paths in directory z -# elsewhere. Therefore, the directory rename done in commit A to z/ -# applies to z/d and maps it to y/d. +# elsewhere. However, this is much like testcase 6b (where commit B +# moves all the original paths out of z/ but opted to keep d +# within z/). This makes it hard to judge where d should end up. # # It's possible that users would get confused about this, but what -# should we do instead? Silently leaving at z/d seems just as bad or -# maybe even worse. Perhaps we could print a big warning about z/d -# and how we're moving to y/d in this case, but when I started thinking -# about the ramifications of doing that, I didn't know how to rule out -# that opening other weird edge and corner cases so I just punted. +# should we do instead? It's not at all clear to me whether z/d or +# y/d or something else is a better resolution here, and other cases +# start getting really tricky, so I just picked one. test_setup_8e () { test_create_repo 8e && @@ -4405,7 +4404,7 @@ test_expect_success '13b(info): messages for transitive rename with conflicted c # Commit O: z/{b,c}, x/{d,e} # Commit A: y/{b,c,d}, x/e # Commit B: z/{b,c,d}, x/e -# Expected: y/{b,c,d}, with info or conflict messages for d ( +# Expected: y/{b,c,d}, x/e, with info or conflict messages for d # A: renamed x/d -> z/d; B: renamed z/ -> y/ AND renamed x/d to y/d # One could argue A had partial knowledge of what was done with # d and B had full knowledge, but that's a slippery slope as From patchwork Sat Aug 8 17:01:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D536722 for ; Sat, 8 Aug 2020 17:01:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35B20206D8 for ; Sat, 8 Aug 2020 17:01:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BquvkSw4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726528AbgHHRBo (ORCPT ); Sat, 8 Aug 2020 13:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726460AbgHHRBc (ORCPT ); Sat, 8 Aug 2020 13:01:32 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B003C061A2A for ; Sat, 8 Aug 2020 10:01:31 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id f7so4434463wrw.1 for ; Sat, 08 Aug 2020 10:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=sPbkpRFPeiKiOvBBVU6Y21sP3wGJKwK6VHh3lRk+/So=; b=BquvkSw4ERVHIy0zHQlZJcZCAkzKV60pXr2rrAmkj1Tr9Rgq4fCFFU8gLy6vxJ/MU8 fDHJEnYMRIdw5UB/mc3dGv1ydnC6S100JPmzmust9WDBrI2pJW12+QtS9GXH6hbc7jJG /mVFDCMkcRvqwaRcwJTkdREJZChvW61as7icykDERPFMR5dG4d1u40zpJ2/y8xd617Lz DotD4C4/qgAVZo1DliwtgRVBdAwRFDEDY6FuzoHoe4x7bGHG1FlyXF8aUacg7aypdcLJ P0xP1FDm+PAwOsq8FpkIU/ZxFmkq6eyCfJsKIQf+XKHG26OC0LGm7TyopbPsae/ORZvv gDXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=sPbkpRFPeiKiOvBBVU6Y21sP3wGJKwK6VHh3lRk+/So=; b=jgInD0nWB29NufiKlBwE4bVCcT/xYCeeIM+WejshC6eBo3vA+3Pxbe5YQAoTTWWu7P aRHPr4sm4oq7ivGrLYQ/RgIszqhpcsASdKk3T6magSNbOD4axKLMC8Wh7Ew5nxJEmGFq llytigqZYqixpikVRvWNe9uE6GdMucs0BXgC5jis0dWP2GLA1btk2YYUFaLK8sNdHmNO kCk51SEQwL2qzFE2Kym/4VPy7QmRIb4tovgiMsbanx8pSX9f7Eyc6vF+1g9Bn+026qCE BlnuMAl4dshaFkwog+EYFYbohM4fQiZW5//2e+iDKG0oOJBDUTM5+DrG75AGWgv2uCu4 /OBw== X-Gm-Message-State: AOAM532qZ7nR1HQX0uWdsAzCTnwMudy/JjGci86ljb7D9q1E/ewjRWXQ Uzs2pGaqBaFA7gdit/K7Ipd+Trwk X-Google-Smtp-Source: ABdhPJyq4cXxXKZsWs12GXkBO1H5Hx+DxcJXBn2z5K0qWgCVc+ygALDrh0NAP8EN9Xdz9b6f2J1ljQ== X-Received: by 2002:a5d:6646:: with SMTP id f6mr17296748wrw.155.1596906089721; Sat, 08 Aug 2020 10:01:29 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id m1sm13985855wmc.28.2020.08.08.10.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:29 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:17 +0000 Subject: [PATCH v2 08/11] t6423: add an explanation about why one of the tests does not pass Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren While we're at it, document why one of the two tests doesn't pass (since I had long since forgotten it)...though the reasoning makes me question why it's considered a failure at all. Maybe I had a good reason when I introduced it, or maybe I just wasn't looking at it clearly? Either way, the explanation may help a future reader. Signed-off-by: Elijah Newren --- t/t6423-merge-rename-directories.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/t6423-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh index bd0f17a3be..2b4a482277 100755 --- a/t/t6423-merge-rename-directories.sh +++ b/t/t6423-merge-rename-directories.sh @@ -2843,6 +2843,14 @@ test_expect_success '9f: Renamed directory that only contained immediate subdirs # Commit A: priority/{alpha,bravo}/$more_files # Commit B: goal/{a,b}/$more_files, goal/c # Expected: priority/{alpha,bravo}/$more_files, priority/c +# We currently fail this test because the directory renames we detect are +# goal/a/ -> priority/alpha/ +# goal/b/ -> priority/bravo/ +# We do not detect +# goal/ -> priority/ +# because of no files found within goal/, and the fact that "a" != "alpha" +# and "b" != "bravo". But I'm not sure it's really a failure given that +# viewpoint... test_setup_9g () { test_create_repo 9g && From patchwork Sat Aug 8 17:01:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706401 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD92816B1 for ; Sat, 8 Aug 2020 17:01:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C58F420716 for ; Sat, 8 Aug 2020 17:01:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nd4+efCr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726514AbgHHRBl (ORCPT ); Sat, 8 Aug 2020 13:01:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbgHHRBf (ORCPT ); Sat, 8 Aug 2020 13:01:35 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA36CC061A27 for ; Sat, 8 Aug 2020 10:01:31 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id f1so4424148wro.2 for ; Sat, 08 Aug 2020 10:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=TeBHYImu6vdjcaZWV7+LSaua+KBLFMSk/ClK8QtyKF8=; b=nd4+efCrHefk+xE0OdARauRDUGENmP/lZ9drA9sQffyUDZHys1UB9C3S8qEgjnOpYt eKJt0GaKJIbiABsex0fZ95n1+NqSh4qrkRDXwYOzFsSyeXcCsMzKxCDnATfwiPL15HuB F64PMyz7LsMYR19zhcW/4BfJS2R7DmoWFS+SnoMs5T9HxMTw/Y+nFAjFYPCHXcl0jh0E Ab7g+0I06aUHzAqAQUdKtvx6z4Q6Bu0QDO3qivZ9TOOhFKKW8g6JHIOZ4zZYgx+E6jMP hYalPn9Ve5CIdj3ezscknbPKF9F2AWKKlTMqq6ZSWm8GwQdbUNJRFPVAhmEQeK3B00tc EGMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=TeBHYImu6vdjcaZWV7+LSaua+KBLFMSk/ClK8QtyKF8=; b=nER1t/W4AvMdZetGMTZ2ZT0yvN1oF+yp69q3JjR5y2kiSmM+w1B2JHaFoKJ4uaAGL+ UoMmBa2BO9Q/6806nkutYOYumMbRQcWoQ7VL+PUAMdHxG2/bfO8QkiaDjDDPg2/qVvuk ZMXm5ZxBww18EUJVDE3XSSlMWVQyOfwm1lW/KNl8hTD6Ak4/Jd3S4DbMnkAZCZ6ANq9Z A4kicTfmpGcghkpRElVb1aPVU0UvDsTH/YUOw8dBJfXCPT1WwEH8kwq8SudbDbCvYYwm kHGm8o2pSuhavYRG6gI81CnWnDySU7ztmC1MxehTmMfQLY9lMiXvELKYjuln1seqqCy+ IZ3A== X-Gm-Message-State: AOAM530dOeHBtHlqGBJVZCHnxvtmILn9UI5D+d5uaby0/5sMmkXfcDST VvVIbkLus9qBvzh18rnBE0HUn/x+ X-Google-Smtp-Source: ABdhPJwJ1uNFrfxPrBCeiMCBuGX0jlameExkrkP+iXTFF7/wVhgZwSfdjkC51mC09lT9J12rqchKvQ== X-Received: by 2002:adf:aace:: with SMTP id i14mr16731831wrc.236.1596906090446; Sat, 08 Aug 2020 10:01:30 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id v16sm11430382wmj.14.2020.08.08.10.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:30 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:18 +0000 Subject: [PATCH v2 09/11] t6422, t6426: be more flexible for add/add conflicts involving renames Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren merge-recursive treats an add/add conflict where one of the adds came from a rename as a separate 'rename/add' type of conflict. However, if there is not content conflict after the content merge(s), then the file is not considered to be conflicted. That suggests the conflict type is really just add/add. Other merge engines might choose to print messages to the console that just refer to these as add/add conflicts; accept both types of output. Note: it could help to notify users if the three-way content merge of the rename had content conflicts, because when we then go to two-way merge THAT with the conflicting add we can get nested conflict markers. merge-recursive, unfortunately, doesn't do that, but other merge engines could. Signed-off-by: Elijah Newren --- t/t6422-merge-rename-corner-cases.sh | 21 +++++++++++++-------- t/t6426-merge-skip-unneeded-updates.sh | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh index 2413f517e7..f3929b65c0 100755 --- a/t/t6422-merge-rename-corner-cases.sh +++ b/t/t6422-merge-rename-corner-cases.sh @@ -457,7 +457,7 @@ test_expect_success 'handle rename-with-content-merge vs. add' ' git checkout A^0 && test_must_fail git merge -s recursive B^0 >out && - test_i18ngrep "CONFLICT (rename/add)" out && + test_i18ngrep "CONFLICT (.*/add)" out && git ls-files -s >out && test_line_count = 2 out && @@ -503,7 +503,7 @@ test_expect_success 'handle rename-with-content-merge vs. add, merge other way' git checkout B^0 && test_must_fail git merge -s recursive A^0 >out && - test_i18ngrep "CONFLICT (rename/add)" out && + test_i18ngrep "CONFLICT (.*/add)" out && git ls-files -s >out && test_line_count = 2 out && @@ -886,12 +886,17 @@ test_expect_failure 'rad-check: rename/add/delete conflict' ' git checkout B^0 && test_must_fail git merge -s recursive A^0 >out 2>err && - # Not sure whether the output should contain just one - # "CONFLICT (rename/add/delete)" line, or if it should break - # it into a pair of "CONFLICT (rename/delete)" and - # "CONFLICT (rename/add)"; allow for either. - test_i18ngrep "CONFLICT (rename.*add)" out && - test_i18ngrep "CONFLICT (rename.*delete)" out && + # Instead of requiring the output to contain one combined line + # CONFLICT (rename/add/delete) + # or perhaps two lines: + # CONFLICT (rename/add): new file collides with rename target + # CONFLICT (rename/delete): rename source removed on other side + # and instead of requiring "rename/add" instead of "add/add", + # be flexible in the type of console output message(s) reported + # for this particular case; we will be more stringent about the + # contents of the index and working directory. + test_i18ngrep "CONFLICT (.*/add)" out && + test_i18ngrep "CONFLICT (rename.*/delete)" out && test_must_be_empty err && git ls-files -s >file_count && diff --git a/t/t6426-merge-skip-unneeded-updates.sh b/t/t6426-merge-skip-unneeded-updates.sh index 5a2d07e516..699813671c 100755 --- a/t/t6426-merge-skip-unneeded-updates.sh +++ b/t/t6426-merge-skip-unneeded-updates.sh @@ -374,7 +374,7 @@ test_expect_success '2c: Modify b & add c VS rename b->c' ' export GIT_MERGE_VERBOSITY && test_must_fail git merge -s recursive B^0 >out 2>err && - test_i18ngrep "CONFLICT (rename/add): Rename b->c" out && + test_i18ngrep "CONFLICT (.*/add):" out && test_must_be_empty err && # Make sure c WAS updated From patchwork Sat Aug 8 17:01:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706403 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40DE7722 for ; Sat, 8 Aug 2020 17:01:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23D98206D8 for ; Sat, 8 Aug 2020 17:01:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kd9D0xdM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbgHHRBm (ORCPT ); Sat, 8 Aug 2020 13:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbgHHRBf (ORCPT ); Sat, 8 Aug 2020 13:01:35 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A490C061A2B for ; Sat, 8 Aug 2020 10:01:32 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id c80so4220896wme.0 for ; Sat, 08 Aug 2020 10:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=+9Lrw6sN2XIQeBtapPHDCsWzdsNThDKuXUCzgi0LJ+k=; b=kd9D0xdM4Qmf9FD01BPMlpYf2B9+hjBuDdMOzdFlG/8Ti/f1EAXTJ07LUkf1p4HR1P NRuhHdEd9lXi2Pu1M4GBP9GoVobOTEPWw+Y8VWNIxcp2/M8xCQyoUek0aHXdRdAT8mWV oh6HEVYcNaV2unSPXS9IJ1j2tOWZ9aH6ktAM9J0YUQ60BCyuEcaQSSvlNI7Cotq216bf DZuClFFwEl3vR/KFDcA7ZGeDyJ2O5Tyg+TwFuw1s8SooC0hFCA7uajoPcAUKqdT/4SvY 1OHjqGBmT771sU6onJE/D34orpVYgN3l3D1G0OSgRSC1ze8LKcyvpxycRZSMa51dGuV4 Kdzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=+9Lrw6sN2XIQeBtapPHDCsWzdsNThDKuXUCzgi0LJ+k=; b=eeB7ct8XH/WrzRGSi5dmZrQ4J/rq2YCOMPs1BQUxrIpZws+S8v+xjR2ksQ88KI2b/9 bzR5PiQeLhG98rWiWqkrR8j+VvnhYTFuSFyEnbmhjbNlLl8WYzZmm/6/pHBrIOlYSB3z dJd3RY6g6CCs2uxOPv29uWEu6K1+Cozg3mSWQEdhqf+fh9P3AzOEr0lUWw8EaYy4Cm5z 26xlNXJZ3SKnYdFxACqamwHoWpR8KN/kCmB9L1B7tfCUdt2698H5N7ETaZ0Z2WA0ETfS l4pMkej2rESyArdabUUkLEB17RuGD1S5S2uh9UmEzq+2PBgroTTfl0y/eSECT4XSeUkU DnkQ== X-Gm-Message-State: AOAM532Amzx+u9Du9iYnyXsJVjkVsjeZSzt9EJkQdZ+HGqp/2H55GUFp GXNwO7VCDv891ji/hwA2U7mR+YDW X-Google-Smtp-Source: ABdhPJwv/pyzPtHGYRMTqST1bSXexfpxUygi3P/9bb+q0kIScpUC4l0c6BWBbhTApcRxU2OQQHnuSA== X-Received: by 2002:a7b:cb47:: with SMTP id v7mr12883346wmj.129.1596906091178; Sat, 08 Aug 2020 10:01:31 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id g14sm14325038wmk.37.2020.08.08.10.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:30 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:19 +0000 Subject: [PATCH v2 10/11] t642[23]: be more flexible for add/add conflicts involving pair renames Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren Much like the last commit accepted 'add/add' and 'rename/add' interchangably, we also want to do the same for 'add/add' and 'rename/rename'. This also allows us to avoid the ambiguity in meaning with 'rename/rename' (is it two separate files renamed to the same location, or one file renamed on both sides but differently)? Signed-off-by: Elijah Newren --- t/t6422-merge-rename-corner-cases.sh | 18 ++++++++++++------ t/t6423-merge-rename-directories.sh | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/t/t6422-merge-rename-corner-cases.sh b/t/t6422-merge-rename-corner-cases.sh index f3929b65c0..3375eaf4e7 100755 --- a/t/t6422-merge-rename-corner-cases.sh +++ b/t/t6422-merge-rename-corner-cases.sh @@ -583,7 +583,7 @@ test_expect_success 'handle rename/rename (2to1) conflict correctly' ' git checkout B^0 && test_must_fail git merge -s recursive C^0 >out && - test_i18ngrep "CONFLICT (rename/rename)" out && + test_i18ngrep "CONFLICT (\(.*\)/\1)" out && git ls-files -s >out && test_line_count = 2 out && @@ -959,11 +959,17 @@ test_expect_failure 'rrdd-check: rename/rename(2to1)/delete/delete conflict' ' git checkout A^0 && test_must_fail git merge -s recursive B^0 >out 2>err && - # Not sure whether the output should contain just one - # "CONFLICT (rename/rename/delete/delete)" line, or if it - # should break it into three: "CONFLICT (rename/rename)" and - # two "CONFLICT (rename/delete)" lines; allow for either. - test_i18ngrep "CONFLICT (rename/rename)" out && + # Instead of requiring the output to contain one combined line + # CONFLICT (rename/rename/delete/delete) + # or perhaps two lines: + # CONFLICT (rename/rename): ... + # CONFLICT (rename/delete): info about pair 1 + # CONFLICT (rename/delete): info about pair 2 + # and instead of requiring "rename/rename" instead of "add/add", + # be flexible in the type of console output message(s) reported + # for this particular case; we will be more stringent about the + # contents of the index and working directory. + test_i18ngrep "CONFLICT (\(.*\)/\1)" out && test_i18ngrep "CONFLICT (rename.*delete)" out && test_must_be_empty err && diff --git a/t/t6423-merge-rename-directories.sh b/t/t6423-merge-rename-directories.sh index 2b4a482277..f7ecbb886d 100755 --- a/t/t6423-merge-rename-directories.sh +++ b/t/t6423-merge-rename-directories.sh @@ -275,7 +275,7 @@ test_expect_success '1d: Directory renames cause a rename/rename(2to1) conflict' git checkout A^0 && test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out && - test_i18ngrep "CONFLICT (rename/rename)" out && + test_i18ngrep "CONFLICT (\(.*\)/\1)" out && git ls-files -s >out && test_line_count = 8 out && @@ -1686,7 +1686,7 @@ test_expect_success '7b: rename/rename(2to1), but only due to transitive rename' git checkout A^0 && test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out && - test_i18ngrep "CONFLICT (rename/rename)" out && + test_i18ngrep "CONFLICT (\(.*\)/\1)" out && git ls-files -s >out && test_line_count = 4 out && From patchwork Sat Aug 8 17:01:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derrick Stolee via GitGitGadget X-Patchwork-Id: 11706407 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B34D516B1 for ; Sat, 8 Aug 2020 17:01:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B5B1206D8 for ; Sat, 8 Aug 2020 17:01:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UpoZn0+1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbgHHRBs (ORCPT ); Sat, 8 Aug 2020 13:01:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbgHHRBf (ORCPT ); Sat, 8 Aug 2020 13:01:35 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3DA8C061A2D for ; Sat, 8 Aug 2020 10:01:34 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id a15so4406086wrh.10 for ; Sat, 08 Aug 2020 10:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=CLLkOGBsioA4S1kw3+zkoNT7lH7FDdtowG131CyGeAY=; b=UpoZn0+1vWVIWYx/sX5V3Xcf+F/8kXBt0OC3GESvh/DmE608varirczroDyuBBDyPW vXL9j5cIvkjY3NTbqwUGU1CHYvgQtEjjf+JgCjZWZVGI2EW+3L7n/so8nEn8/G2dywsR aSLpIo16kqwFOynBVMSsDFY5Hr7A2MrZK2FMNi6vT2S/1qphkQVYo7i6Ih7izx6Ab2fj I+o/sRiUzCwNjxB/rpIm9KttSy+zLHIzcmarPbTXl+yDAHSxktVmcBAE9KuGHiRnivu0 N3e8fVFv1tBJDm4Uk9FhEAfkwoItZz1kA12R0MXXb5nzugB+tCx0mIg1t4+L0C9bg3FK WjCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=CLLkOGBsioA4S1kw3+zkoNT7lH7FDdtowG131CyGeAY=; b=n9tAu602sciwu5mQdUVXyHq7MolKQ7Wnzvx3MzF/nTY3NGj0m0NdThmSmA4OsFS5oU sW6koL8VqbNmPZpxU5Po4QWqMsMY7hz2w1xHAIER5LhqKkG/4VQnfMkLYFabJEiaI8gf UUJQ3MQchO50taG6iZUt7cUYB8RBXUOqRmsG/hdRL2OxiyyKSmJudE/ghLI124I8mggW cYHoQlHCnCzJmMvx/17yJMzedXbW/HTwF1U9Cmo6Q7//UEnsPDjUQ8imt+/4gp7aYA3Q 66/LqE7CMuNxdSbg79l0hRcJWfX4LR6i2LUXnJoz/+wYjab9rnU6CWIR9eiNE3cpBxWF Dldw== X-Gm-Message-State: AOAM5314IZVzIyv2py0tad4Izsfbo08JfUocLniveWjUZac7kouxYorT LaQRr30wTsbieIIahYlUUSxfJ/Dc X-Google-Smtp-Source: ABdhPJzH6tyEPBRRcSXpyBTuUSYRbuAH6xAQ9TUq2vzl/t++Na4Q/NJ3efjVS29187Id8WyVSEsI+A== X-Received: by 2002:adf:aad8:: with SMTP id i24mr16904858wrc.336.1596906092021; Sat, 08 Aug 2020 10:01:32 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id j2sm15554477wrp.46.2020.08.08.10.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2020 10:01:31 -0700 (PDT) Message-Id: <38f65735118955e56af2a7b0a786e167b5f7263d.1596906081.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Sat, 08 Aug 2020 17:01:20 +0000 Subject: [PATCH v2 11/11] t6425: be more flexible with rename/delete conflict messages Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Elijah Newren , Elijah Newren Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren t6425 was very picky about the exact output message produced by a rename/delete conflict, in a way that just scratches the surface of the mess that was built into merge-recursive. The idea was that it would try to find the possible combinations of different conflict types, and when more than one was present for one path, it would try to provide a combined message that covered all the cases. There's a lot to unravel here... First, there's a basic conflict type known as modify/delete, which is a content conflict. It occurs when one side deletes a file, but the other modifies it. There is also a path conflict known as a rename/delete. This occurs when one side deletes a path, and the other renames it. This is not a content conflict, it is a path conflict. It will often occur in combination with a content conflict, though, namely a modify/delete. As such, these two were often combined. Another type of conflict that can exist is a directory/file conflict. For example, one side adds a new file at some path, and the other side of history adds a directory at the same path. The path that was "added" could have been put there by a rename, though. Thus, we have the possibility of a single path being affected by a modify/delete, a rename/delete, and a directory/file conflict. In part, this was a natural by-product of merge-recursive's design. Since it was doing a four way merge with the contents of the working tree being the fourth factor it had to consider, it had working tree handling spread all over the code. It also had directory/file conflict handling spread everywhere through all the other types of conflicts. And our testsuite has a huge number of directory/file conflict tests because trying to get them right required modifying so many different codepaths. A natural outgrowth of this kind of structure is conflict messages that combine all the different types that the current codepath is considering. However, if we want to make the different conflict types orthogonal and avoid repeating ourselves and getting very brittle code, then we need to split the messages from these different conflict types apart. Besides, trying to determine all possible permutations is a _royal_ mess. The code to handle the rename/delete/directory/file conflict output is already somewhat hard to parse, and is somewhat brittle. But if we really wanted to go that route, then we'd have to have special handling for the following types of combinations: * rename/add/delete: on side of history that didn't rename the given file, remove the file instead and place an unrelated file in the way of the rename * rename/rename(2to1)/mode conflict/delete/delete: two different files, one executable and the other not, are renamed to the same location, each side deletes the source file that the other side renames * rename/rename(1to2)/add/add: file renamed differently on each side of history, with each side placing an unrelated file in the way of the other * rename/rename(1to2)/content conflict/file location/(D/F)/(D/F)/: both sides modify a file in conflicting way, both rename that file but to different paths, one side renames the directory which the other side had renamed that file into causing it to possibly need a transitive rename, and each side puts a directory in the way of the other's path. Let's back away from this path of insanity, and allow the different types of conflicts to be handled by separate pieces of non-repeated code by allowing the conflict messages to be split into their separate types. (If multiple conflict types affect a single path, the conflict messages can be printed sequentially.) Start this path with a simple change: modify this test to be more flexible and accept the output either merge backend (recursive or the new ort) will produce. Signed-off-by: Elijah Newren --- t/t6425-merge-rename-delete.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t6425-merge-rename-delete.sh b/t/t6425-merge-rename-delete.sh index 5d33577d2f..f79d021590 100755 --- a/t/t6425-merge-rename-delete.sh +++ b/t/t6425-merge-rename-delete.sh @@ -17,7 +17,8 @@ test_expect_success 'rename/delete' ' git commit -m "delete" && test_must_fail git merge --strategy=recursive rename >output && - test_i18ngrep "CONFLICT (rename/delete): A deleted in HEAD and renamed to B in rename. Version rename of B left in tree." output + test_i18ngrep "CONFLICT (rename/delete): A.* renamed .*to B.* in rename" output && + test_i18ngrep "CONFLICT (rename/delete): A.*deleted in HEAD." output ' test_done