From patchwork Mon Aug 10 22:29:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708315 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 9B04F16B1 for ; Mon, 10 Aug 2020 22:29:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B0982076C for ; Mon, 10 Aug 2020 22:29:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AsgHHb7D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727936AbgHJW3Y (ORCPT ); Mon, 10 Aug 2020 18:29:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbgHJW3Y (ORCPT ); Mon, 10 Aug 2020 18:29:24 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C828C06174A for ; Mon, 10 Aug 2020 15:29:24 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id z18so9622566wrm.12 for ; Mon, 10 Aug 2020 15:29:23 -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=AsgHHb7DtO1Cq399KDP0+cbjZQTDIZRj0fxr4fY3A6RTsKgxpGaJRnKhO7m9HoQefM 6K8BaaWuc6KH6mhLI0xlxnrYCZqMct4HL3eqiux0eV4lM25XHPA9lIvAxH6L5UPyWtVZ K3QKSFHID4A9fVytWe4+3EjbaRLvBatkZHBUN4IkeXHLWkamIEsDiRsNORTUUkAftNwB do2kFsSBpII3WioSMwiBvdqnnDziQ31xBt2zBLrrngNJz9s/WjepZrHM/ElQn7zjPEFU CXS9shjr/kU3XLw+uVZE9XpivhXdiLoelkaZOiCNlvquEgdOJJMOS4KkLH3RWaGLf9jc 7DSA== 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=E+YvXWNHwGlGJOtZa8qcgrW6uaGEdiIAH4c0lpH/mHxIDts4V47qCtfyY/PdAzYyD2 63UHAUxxnM7ZEuxE0oY3N+EaC0rYpp4LMetes2i9eVRwUrb6oeadqU1wwU6vq/7dpQy/ YIRcJqSnuSdzj12zAtCrRAZdjCfAIKAUp+LNJJ39SX0fiwPfgLBUmYUtHG3UguKTrMPI QjWKMmTdIlPlqDth1kB5xbU7CQeOOtockCw+54JCfI07xga4Qd7Q2XaXlVovGalR8PNm gAFP88VvGs7Fe3RToW4cBpfDqbz0aGjnoP0SLZD3yM4ys9QVmb2I6x+ww26yVZN+RpdZ H3nQ== X-Gm-Message-State: AOAM530AxaEwAsHZLIK5UI7GnAksSMDa2bC0vUJIaKjdD/TRT1pyKac5 DG5J3FQNV4+N806Bx3/ANZLmej9u X-Google-Smtp-Source: ABdhPJxMMpLywbxkPQCO4uITF7Cq1WW+KHh8gpGZgxA/PxIyvglwDnem34kUbhgRPe89LFWzTWWtPw== X-Received: by 2002:adf:ab46:: with SMTP id r6mr26535907wrc.260.1597098562325; Mon, 10 Aug 2020 15:29:22 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 6sm1736419wmf.4.2020.08.10.15.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:21 -0700 (PDT) Message-Id: <8fec657942267c0423c05de59e1867db88ebbc9b.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:09 +0000 Subject: [PATCH v3 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 Mon Aug 10 22:29:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708331 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 EDA31739 for ; Mon, 10 Aug 2020 22:29:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF17B2076C for ; Mon, 10 Aug 2020 22:29:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mrBzWdD8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727955AbgHJW32 (ORCPT ); Mon, 10 Aug 2020 18:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727942AbgHJW30 (ORCPT ); Mon, 10 Aug 2020 18:29:26 -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 33626C061787 for ; Mon, 10 Aug 2020 15:29:26 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id 3so1025696wmi.1 for ; Mon, 10 Aug 2020 15:29: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=7LB9Gvzf99PL3pycT84UZuRRyFKy1dC7nI933Lle8sI=; b=mrBzWdD87o+a2qQGS3iWkQdEtylf1pogphyAo+MWnoKD6D30kt9pIhQBRuKrryOwtr Guu4r6HyGXNidOg3BCpCnfaud2OpPlhDvMKmrSSnE7O6agDVXqHs7wDfxFDYdcEAP+L3 xXfAp5r4vekD2LPadupStz/RnOupEFnsGxGViYM5jJwlXPfQJnNzODbFMz4pSg/ldYwU Tf56sxaPPDpllaUXSpJszVZK7/ns0c3E7DoaEVStWFRJLPkdvkdIHKoIVsa4D/tHfhgy 8xH3S1p70b7zmNzNGj+a09ZO9VFUMflOLKaZ2uLuVbofFSSo4tdWcyOMIFzZclDXHT2W /5VA== 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=7LB9Gvzf99PL3pycT84UZuRRyFKy1dC7nI933Lle8sI=; b=Hgo66BIjsGBE+JAzxSYE/ZNEG7f0qZfJBeDD1R9XflqcgEdI9lR0Fucd0o2qQh6lzl Ll3YEFX/jB1F9BB0RprHDxy2nxH97EEYoT2+NeId5A2D9RYqnz48wZ1T7MEZZ5n704H/ waT9ML+1CpXdo5EerpWR5loFNtho2Tk67LYYLK1Y7AszilE/cwIEMeRZjK8TZYUyJ/Zc PngJ1gJ0qoQD1pcSy4jye0oTEI7y08+0NlAf4MBQBxCYCh6GQEOExomau1F8cFB8TOgR R9/MZg+XlkG/QlZAX831U0tNZoZ5XDd/MBFhkARvBTPHYBx6xuAlLdU2R9dIrYUr70hX y5VQ== X-Gm-Message-State: AOAM530AJEi0cN03CpjrJTUx6QmBD/uyj8GVkIWi384FGKBErLBy9nrj XlJHDXSJ+uj4eLI0cSAVyGJv8JJy X-Google-Smtp-Source: ABdhPJy4toRjRie+crxe+6EekR5tFql/zDkmXNsSQJOdYBmjlr42dqmBlMp949OM1dgStkAhnHZNsg== X-Received: by 2002:a7b:c8da:: with SMTP id f26mr1251528wml.126.1597098563200; Mon, 10 Aug 2020 15:29:23 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id i7sm23252218wrs.25.2020.08.10.15.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:22 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:10 +0000 Subject: [PATCH v3 02/11] t6418: tighten delete/normalize conflict testcase 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 testcase only required that the merge complete without conflict, without specifying what the correct resolution was. Since normalization changed this from a modify/delete to a not-modified/delete, the correct resolution is to have the file be removed at the end. Add a check for this resolution. Signed-off-by: Elijah Newren --- t/t6418-merge-text-auto.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t6418-merge-text-auto.sh b/t/t6418-merge-text-auto.sh index 89c86d4e56..30983d18b1 100755 --- a/t/t6418-merge-text-auto.sh +++ b/t/t6418-merge-text-auto.sh @@ -197,7 +197,8 @@ test_expect_success 'Test delete/normalize conflict' ' git commit -m "remove file" && git checkout master && git reset --hard a^ && - git merge side + git merge side && + test_path_is_missing file ' test_done From patchwork Mon Aug 10 22:29:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708337 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 C85FD739 for ; Mon, 10 Aug 2020 22:29:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A72052075D for ; Mon, 10 Aug 2020 22:29:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PCmAWADw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727951AbgHJW31 (ORCPT ); Mon, 10 Aug 2020 18:29:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbgHJW3Z (ORCPT ); Mon, 10 Aug 2020 18:29:25 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62669C06174A for ; Mon, 10 Aug 2020 15:29:25 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id y3so9633336wrl.4 for ; Mon, 10 Aug 2020 15:29:25 -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=PCmAWADwyT9aeAPjYJi6ualmytZrXkEPDdl4uM8odKZerFxY8WMKTqaor/tYdf9Txj AaGG+y4IDuRlKAOByXTFCGKLkk+g65qP4tgz5k8zdeqr34FUmaSEtyrV++4CLI3m0Oz/ dffVAWDRxEfRwV/GR0NI5BxHumpGTxzisUW/WqfPGGoLiVf05ZS5O7Qb6vEEwIE9qWsO Gmkq2NMfbbdowe2B8fOvZmdtEkp5ZuE/SSvbH2CCl2tqpxXi7kuodMKkZ0aeczV/dkOd 2+mIOYgLi6Oeb3+8DvnVRIuyay1v+sV7Q7ButaoRKIRdze5Vwf9K/eNefbwHgD0gl6oE 3pmA== 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=FebkgzOEUuhkYeAzP6i+iJMXQRI/g2x7sW0jMUobabu65qznIw9+zfhQCR4DXVY6lG sYM7Elox2UgVup7/vOdIcC8h7aEheIOGgpYk/9dugXLZUh6hBc48XaO6HUREnTSEnMeF zq7y4F5bLtUWXR72fe4QPRxyawqQs8Nn/AhKF/fG8HyIK82ysT8Aip56XfjrI8Rm8XRz 3v5t0NWX81pCTyoswkdZOuPjfijzvOIp/l2g9rpJePt56Kczk8YQyc2KTkHKxDYcrTRY h5x0HRKjrykiC9aX9Gc9JuIvLgdUQpDAUoGWr3d6JUyIS6sTNqJBCJeS4xBEfkMEssfM UYOA== X-Gm-Message-State: AOAM530TTpy2Jaygkg3a5eyRNH+3D5KnAoTXLi0dZ9CdDeKDA+1S8Msw cgxsMdiDqwim6CzL7mDDRhz+rvx/ X-Google-Smtp-Source: ABdhPJzqQtX2+4sqyZD0coNrvrYBT7B83EQ3qOZoUob538De/y5jdoYarwdyyBFnK8uVB7ET/L+Yhw== X-Received: by 2002:a5d:480b:: with SMTP id l11mr25357200wrq.85.1597098563904; Mon, 10 Aug 2020 15:29:23 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id f15sm1537030wmj.39.2020.08.10.15.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:23 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:11 +0000 Subject: [PATCH v3 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 Mon Aug 10 22:29:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708329 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 58EEF618 for ; Mon, 10 Aug 2020 22:29:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 348AB20782 for ; Mon, 10 Aug 2020 22:29:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OjgZhtSm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727959AbgHJW32 (ORCPT ); Mon, 10 Aug 2020 18:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727941AbgHJW30 (ORCPT ); Mon, 10 Aug 2020 18:29:26 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 221E4C061756 for ; Mon, 10 Aug 2020 15:29:26 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id r4so9622884wrx.9 for ; Mon, 10 Aug 2020 15:29: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=xKuJGgSfiy3dx+s9AVZCYCTr2e5m53uc2WX+DfrFmcU=; b=OjgZhtSmihE8Vr1ORo5buBQP+MolWvfs2pxCKXgEUbj9p+5ciIZtn9IVj9RoWA8OEj 4hvgfuIa4GHD5IhCnskLdUwC4DwWH96WqQTpUAw2dhGzJOUkurDnqAkDV7n6Z2b5otWM r7bar/wGWW/slL9eDkeqMcsozWrCxmjl5mL2xmtt575teJMMp3Q/KWIXV6k+B5WECrue vd3L7qjtwQQLDkwrtPAy/kDtqjxCVNfy0Xz+ExkGY6c3WS9wkVFhGT3+ZdZNytJDf70s hobRM/VuadhJmNxLybTVjEZ575PFjtZ57+VCn5EeO9TlW4wx1pv7UTffHfWecveqBH3S rlvw== 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=xKuJGgSfiy3dx+s9AVZCYCTr2e5m53uc2WX+DfrFmcU=; b=JdzG/61wXs1Y3nOpJFrwqwhQ4/vBjtiJflfUNmdX/c5oT7H8JZiKJ2kmtHDR5sH+kE QjQxbei5tJ/hYA2B173fgLp6PDeKUKEyEg9p7lpuDrzt7p00GCIwPS2AlJYQ5wdAggNw c+6TwRFBBMV87S18NFgiQx38UhfpRHMMcAi23wjb722oUXy6se8HJothyuOkCreec3RP I1yPrmSmlqGgDvrlHuOULV/33XcThuWiffrc9pDY0e6CgGdwXvNZyep3xXTeFZIUYWrQ WC6F6WqVPiqiAF1l9rFSaqFUkqxdLKVFsGFh8zcH6l7ZqNVvLvYbQdkMk2qO+fCLimQl lwXg== X-Gm-Message-State: AOAM533E9X3nRQTEDQBa8NEoyt/xxowho8dT6gyezxD4QdmnseYT+Q0D iU+B55Wj7R5jpeMTIPOo/U7K5Mub X-Google-Smtp-Source: ABdhPJy5Q60O+TrnawVdDFQ0E7kKwWWuR4Y9S5eWDXzAEdGffI6tmdm5SIrzx3PeadfHnTuNYSpupw== X-Received: by 2002:adf:f511:: with SMTP id q17mr3237262wro.414.1597098564576; Mon, 10 Aug 2020 15:29:24 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id t13sm22666435wru.65.2020.08.10.15.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:24 -0700 (PDT) Message-Id: <78df85aee5ff84293912632f48951718cff3dee8.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:12 +0000 Subject: [PATCH v3 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 ever noticed it until now. Correct the count, as these tests clearly create 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 Mon Aug 10 22:29:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708317 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 59D6B618 for ; Mon, 10 Aug 2020 22:29:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39E092073E for ; Mon, 10 Aug 2020 22:29:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QJAghY6+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727962AbgHJW32 (ORCPT ); Mon, 10 Aug 2020 18:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727943AbgHJW31 (ORCPT ); Mon, 10 Aug 2020 18:29:27 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B03FBC061788 for ; Mon, 10 Aug 2020 15:29:26 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id a15so9603465wrh.10 for ; Mon, 10 Aug 2020 15:29: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=v/YrnIQx0Qjh+uN3OIOcV92pi53pOcv0u9rwLWldDJs=; b=QJAghY6+I2/AQFzdXrgRorukLIJ4hZ3UdOPnCBXbPVjnlLlUgzSLQZzzYFcJ9ivXyL R3VxOKhXpFI+Vi+SH1sVE5B4t6JmPGeN6/qZM4gDcOX3kXoohKJRqUjPYaKwjgWmY8qO em8mdKgCARZ//WgYBBbXXBAgy3le61Ur0GEK1pVz4mZHfADYO9hE72NYHh5S+8+wz/Rz xMDZ8o5PyMhYm+L/GWyJ7YgoqNoq1mdDdGh5jLSLx8fLquA3RwYUcm8cgfdc2G/TSD1F a8Bhvl+gkZlbebvu4V68J2DEl5mGRyvNSPnB55klU/01eCFnaA/PbhS6oHbjQmF7Yjx9 shjQ== 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=I0qfIs74a6IGxM7TGsanBfP4ReobqChJuqN+458lCaL1Grb/hYA2TCDhmIocE7PpJv jhZzPwILPwm9mRjn2hD3CqKCjizAWCFDZJXzyQ49VrCNV2q+mfLwzeCLrqkB5Ng6TyCJ zxLNTPCRHH2TCAuCi+5irdEntmgVZ0JDcab6O9qu0pTLBaMjgEEsyvLc6gX7YXjLnefs RQwkwa/OrxXr0q7DLZn6nxzX3tzIyhsz0uEPjjC9XAZ279ym2ZXaPc6rK0B+ob/v75Kl zZCJJk6rE+GPGWjyjFhSsxPZJwhD2eMWXTZZhbrci/sZc0BMOOzNv+82joJB4TQYbz7N KMkw== X-Gm-Message-State: AOAM5329n/hxeo/NVUuyQp+MwfDn+wghP35wVkAw1O1CMC1FsrswthNm HzIep+iMj0bEIs3VjWeIv5M9nZs4 X-Google-Smtp-Source: ABdhPJy4DSUEfjIZ8ozA5tXj84Kd7vKBPmocAqoRSwu361Rxhbh+6fIk24CpftA3STI6Oja8+fZA8A== X-Received: by 2002:adf:e411:: with SMTP id g17mr28274005wrm.77.1597098565391; Mon, 10 Aug 2020 15:29:25 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 126sm1611886wme.42.2020.08.10.15.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:24 -0700 (PDT) Message-Id: <8ac78dc71be0bc25c61e3bef929872354684648a.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:13 +0000 Subject: [PATCH v3 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 Mon Aug 10 22:29:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708321 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 9280E16B1 for ; Mon, 10 Aug 2020 22:29:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B64F2076C for ; Mon, 10 Aug 2020 22:29:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GIc9TYVQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727965AbgHJW33 (ORCPT ); Mon, 10 Aug 2020 18:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727956AbgHJW32 (ORCPT ); Mon, 10 Aug 2020 18:29:28 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9A63C06174A for ; Mon, 10 Aug 2020 15:29:27 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id 88so9631345wrh.3 for ; Mon, 10 Aug 2020 15:29: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=i00B2BT4Kn6NDWnpqeIIET1PxK/n8DZQOVdnCgauGS8=; b=GIc9TYVQ9270iiivWe5PRFlEptixLQbi4x8vWPC1DJko2gJBedVeTl1jJiao51SU2e 9Mtw2klbRfCwfLv4n1GgycFOIKgncHwe+fHFRYE9LjegCMB6tcVmB5LS8Fxiz6d1hrlp /yoenoyoWo+dCN9IXLv+6H2apV9+gZrH7N7imS1ilo3dRxSoFNeVcKUzfUIySopcSdhR 83sQHe1JwIg/s+gljQGcaLE1/dnhOJXLLWggZBVG6+ETESJDdMz9vp6/jPi5E8B16qc9 sb6YX7X0o0uAVd7EhDR3J9djQNfymS96mBMwG6WjRWFosnaAd946s2x1zkceCUFx1p0h joDA== 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=c4DGgCITaBPVHjX4vCRLGjXibr0/n3NKTj5e++addvaf9cSqX/lTyWXjmPlvDa4G9k 3T0+D9+FONnYltcYbKP4/OE8K1cGArH1eGSonp9f+QCd+I5fVbqF9m0wJqV+f4W2pAea t1mBYPC/k+acMVoqPy3Z9yHW6IQY4XQUmNyZSgsfztdZH6kZBIMEioSxJvP/0u+msDg3 rQAoXHwAS/3MOsHwAmOTbawvvrSo3NgssiALJSFnLBPFIcg+Ui+hzUJd7QqqwrQr8iRV yUoyf9pt3d4thCDc/8CBeToUAUXBmPlxH4VN39VFvlujCoOYXEVIx6LNDxQtPvwFlcmD grtg== X-Gm-Message-State: AOAM532vhrfgSfoeWpCn5tHfKlWE6vWhNHej7BG1t8ZvntWOjNOlmSUy Zq0E7qABjTkB6M1vYtsr0ioaBPj7 X-Google-Smtp-Source: ABdhPJwycLC1k1iIAlC2nle4+k7cz0jd+fVvwUaXLL8/6p7hvjX/Vfzq11MmvM6+wzRaW+a3gFHQdw== X-Received: by 2002:a5d:45c9:: with SMTP id b9mr25960133wrs.283.1597098566291; Mon, 10 Aug 2020 15:29:26 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l81sm1714979wmf.4.2020.08.10.15.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:25 -0700 (PDT) Message-Id: <6674ae9de48fe2014eb69b3fe31fddfe4b0414d8.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:14 +0000 Subject: [PATCH v3 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 Mon Aug 10 22:29:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708323 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 E05B4618 for ; Mon, 10 Aug 2020 22:29:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1DE62075D for ; Mon, 10 Aug 2020 22:29:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IBWZFwtz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727976AbgHJW3a (ORCPT ); Mon, 10 Aug 2020 18:29:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727956AbgHJW33 (ORCPT ); Mon, 10 Aug 2020 18:29:29 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1782AC06174A for ; Mon, 10 Aug 2020 15:29:29 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id c80so921857wme.0 for ; Mon, 10 Aug 2020 15:29:29 -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=IBWZFwtzS7Nj1P+x4INktG1vwoTSx6zyQGsH2LGdJ6fethfSJijgoxYUjw96X5G9+I 5n1pESsT3XcZWv3C9mg66Scc1IdB6kcOy3D5CYc1KP+j4W/lmXhJH01JNO+g3+Ag9Syk gcoKj1N5CkO0lGCtYxCH1DZEPQDfnMAPTGXcimXR5Z+nhmZY39lOKeJtVdp/M0144Lu8 e1Jmb9maqB5xZxVsmKbXPVTpEQqK6mQfAT4hXU8GBX3aYtffXlzsYasX4XKarVsdyqHC Wx4H42whSc0zjhxLuEMm98eKiwEInyent9V3o3IfWDwdo1QM6zIkalyeukCATYFx2j4N 6m4Q== 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=AIogLz0gEHnaTDxsRmzeCpvS40tH9mOxrrt1HangbvPOFcnkUchLkBSV6C9cFwSO/X IrTGtH+GEbsoZ8S9gKRtNnAeCfiNYyAxHsqJNQXEC1G3CPZzQ9pUJD5I+A/8keq3884e Zy/kjrsdtlpegX3teeNOi4WQ9Oa9PtIWZ+OrbAlwhXmsBdAIF1QX15afHM2qW7UQAK5n IBx00WL5bZbaMCpP8PkhhtiQ8ycDO8z57rBo+YXPrjAIWEJKQreqIDah81fB6ZjHdEm/ 7lOCWE+43THQ4kmdCaQ9WJdrHvXKnuQ4YOGPkzSPV1Ss5Da/qT4FrUpCzd+ROKWwCRQV wTvw== X-Gm-Message-State: AOAM531B4Z4d5GjTpbP+kPMT88R2KkP6PtVbFYPv5IlFIEtzByhn8JAF vKYhMNJM+iueY5fjbEVv+m0b46S7 X-Google-Smtp-Source: ABdhPJwbMoe6JtFy1IGw45NPL7X3NUXYAbO1hoDsNkQXgbdNKqi6AJo9oop/Sx4G9G8/ue3omxiE0Q== X-Received: by 2002:a7b:c0cb:: with SMTP id s11mr1183340wmh.89.1597098567006; Mon, 10 Aug 2020 15:29:27 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id b8sm22817884wrv.4.2020.08.10.15.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:26 -0700 (PDT) Message-Id: <783ebb65768b2ca810bb11ae1845d1e1db346ff8.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:15 +0000 Subject: [PATCH v3 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 Mon Aug 10 22:29:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708325 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 1CA15739 for ; Mon, 10 Aug 2020 22:29:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED7302076C for ; Mon, 10 Aug 2020 22:29:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Zuqm5eTF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727979AbgHJW3b (ORCPT ); Mon, 10 Aug 2020 18:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727968AbgHJW33 (ORCPT ); Mon, 10 Aug 2020 18:29:29 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FAB9C061756 for ; Mon, 10 Aug 2020 15:29:29 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id g75so564762wme.4 for ; Mon, 10 Aug 2020 15:29:29 -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=kcIe1Ke81WWpA0CcEajHDDrvDHODyyfkiE98DE6q6Zo=; b=Zuqm5eTFdONKLLEaQb37IDZfuZmUnGljkQt8C97+JS2DQGdqfu3+3gdtrnyT3JFeah 57zXWHUavdA7xk3PY56k8BUGcNjq8qt68/LBBWWs3vX1RF11Xu7r7G3nn7WU1yaoI7KS bFhAjViOy8FqQn2xzRbOmjSQE37ivrwk+fK1Gyu5vebg6Gc8ZOgHyneEAnyhUUC5ohYZ Bya8iVQe/ETgyAN4lDSKMeVkM0OFzXcB3s2WNJoBT0c95ntCoL2RD8zn26xDObYZnl6H euSQfOhu3HbDCAtMSfu+J7PJclWUs/O/rCevwtLtSjtM90CbHXc0l66W23+tte6EEuFZ zPAw== 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=kcIe1Ke81WWpA0CcEajHDDrvDHODyyfkiE98DE6q6Zo=; b=Z0oVwUXN01T0O9XVn47CPsge+JK4YM2tur4zAZdhvmE8IfpBMF27Hh93ctxDbsiVzm OhdI4PxNL9ZAYOr+Wkzp8SDzpXc6iwKNakfv2HyHqSdFk4OGFpbNpLBtcNPdmHL9NRaz svjGb3YI7mbQWRgLooeW9iKndglSpEzkvnwI1rwyU9Ck0XJccaS8bPH9b83Tirv9/ZrJ FA0X+57IhEonMHnBSGwMbDsxHyoI821FzKkz0YrwydMbuuDL+zxHv23Fe72GGq3YpJxR PbhZGuHJsilyUP0g8GpmHy85v0H4FqkX8qrRhJeEvHPu7/YyiIPBuGkRIq1MouIzTxsp Nlsg== X-Gm-Message-State: AOAM530UgEQN610DlFSi8FjBcmpjAnsnAk+kjVE9Yd2BMGb3taAJE0sd gjR+8UWuxUkpjV0AQlJkw6VXyl38 X-Google-Smtp-Source: ABdhPJxFrGndCTOJ/9/XffttngkNCXoFvuUQ6ykKbZEVEWPtgW8ZnQrrEwA/IcI0fRupY7R1FDyNVA== X-Received: by 2002:a1c:b7c2:: with SMTP id h185mr1299325wmf.168.1597098567797; Mon, 10 Aug 2020 15:29:27 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id a11sm25106993wrq.0.2020.08.10.15.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:27 -0700 (PDT) Message-Id: <82e1b0e69671f16e21208b5931c54266f2f743f3.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:16 +0000 Subject: [PATCH v3 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 I had long since forgotten the idea behind this test and why it failed, and took a little while to figure it out. To prevent others from having to spend a similar time on it, add an explanation in the comments. However, the reasoning in the explanation makes me question why I considered it a failure at all. I'm not sure if I had a better reason when I originally wrote it, but for now just add commentary about the possible expectations and why it behaves the way it does right now. 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 Mon Aug 10 22:29:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708327 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 505CE739 for ; Mon, 10 Aug 2020 22:29:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E95F2076C for ; Mon, 10 Aug 2020 22:29:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W4gzNa7d" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726949AbgHJW3c (ORCPT ); Mon, 10 Aug 2020 18:29:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727045AbgHJW3a (ORCPT ); Mon, 10 Aug 2020 18:29:30 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFD81C06174A for ; Mon, 10 Aug 2020 15:29:29 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id r2so9625341wrs.8 for ; Mon, 10 Aug 2020 15:29:29 -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=W4gzNa7drC73pbqnWhQpF5gU3k/gzJDwtjRqBrVA708Ex8wUN67rw9Oyqu3aCYVIqk c7ZsBylRZJnVJpohzvehwfNtPENWiJATAjKufAgQxBC8LeL9BiJthf1Kw8gWrugfGw7N swELTfF2LuGHpXKQ1Q0EZb81zplcSCgvEQQIb9ffIpNsZY7IYm1BXIVUKViJLczS63qP 7NmTtXPUICx4isXc6d2NVNMzZgRwDYyvWqFcbDh1JZg891QwlCJgfxqHCLyp22kyF39H n/frwvexE3wVnsCcoCjqsioC0bb5KD819ZbN1aMLzPU1Es9mCi3jZk/Qrtt38GvsuDaI GnGQ== 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=j3VfcNNbKG5NAP36cYGqYipScJHlqTeFsRKh83wp2kwLgc5mZbiYuxqIfzBiXlLyBh y96n2OquphHCfPugJezeVM/hj4k92aFMrepIPTN5ApABkaf7SOB2qIwiSe6TbYnvjODN spre2/ZK0nh4Fs/HmJon+8z+sQzX70tMPeEO/OrKluCGsVFjmLXgVdUrbNMBgAxSWt7h Y8PnSCAdpumncf37cfOhM/X27LLtYj+dby1zRg8aBMWKZcM7z6XF4CHdiTCE7Uyu/A4K STH6I+7D+LRrGsTqbEsC0aNNPMyDqqNygmdfHooRAA9cFh22W+wZXoQgcQmqV181f5o0 H8GQ== X-Gm-Message-State: AOAM531/vHDDAW3pFxCdR3cI3Mc/bw9MZomQ6i+1t0Q49+tRkBXmh5Qp jjHg8vLE1hsWHMGZnR139YaimO2a X-Google-Smtp-Source: ABdhPJwQVQ0yd9b0VZDLSNsTlpwiD0Lwf9Xn4qrZ8G7JvrHWql2Z2yQVSF9IO4um0o0nGzXSDR+ThQ== X-Received: by 2002:adf:fe0c:: with SMTP id n12mr25473576wrr.48.1597098568545; Mon, 10 Aug 2020 15:29:28 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id c24sm23117405wrb.11.2020.08.10.15.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:28 -0700 (PDT) Message-Id: <42e3f699f1c67a8c3d9dbfbf3c79342811d9e9fa.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:17 +0000 Subject: [PATCH v3 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 Mon Aug 10 22:29:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708333 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 69871618 for ; Mon, 10 Aug 2020 22:29:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D88D20768 for ; Mon, 10 Aug 2020 22:29:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VSsE8ZdC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbgHJW3f (ORCPT ); Mon, 10 Aug 2020 18:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727977AbgHJW3b (ORCPT ); Mon, 10 Aug 2020 18:29:31 -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 C3456C06174A for ; Mon, 10 Aug 2020 15:29:30 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id a15so9603577wrh.10 for ; Mon, 10 Aug 2020 15:29: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=+9Lrw6sN2XIQeBtapPHDCsWzdsNThDKuXUCzgi0LJ+k=; b=VSsE8ZdC31nQYZZcjqoIdEIJ434cQ4ilbRDaAGGt6nOE+L1o8EBDfVSHoijdOTGTtq VALKVFC0Y4WiOA6eRKvq3VwK+ChAdU6S+AcqIoAOf6C61TC2Pvpa9LfreBHxgtjwC7a6 PVvDvb2VGvatTVzSAMrM5GOJ0h+xsL162sk38j+PQ1Hrape08wP9t8drRdQPHq8zkY0L Wiz3CHQcBLcGElO+hYfZGhriTIQxgJtdHOJk/bVqF0A5eEAD3AsfWpTfzfJUV3JAN34i YPikbGLlUJP02iHx1p0I6f1hODBCTVP4hq+D2cSciUTJRB0JSOFdeCibWrwew3xzfF91 2HYg== 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=aODhx7XjORLvgHP/QsuG5WEbekYUx55wBmI623kCqgi99zHA+3S7oKUBIEr1ESLeTk kJDGbKoIdlmU4NMRq6PuHguof6a8rW2AT0vzZ7mZRuM66yiBRFW92d+IHXh/ghPosVSQ eKQQPRj8meheGxGm3KhCK1HYkCkFvJbPwtv3RGU/oBU8vgYa8+TVsYkj6LVv6vdVzUvn bbaJZ5+ptPQ59QZyI40v7elcVtTHeQYy/EhThVYfibkv1k8nb+hmqsVMGQnz/rs4ETJa E72sXuhJZJzqxBTc0mjs/kLXsflOqRp8mlkekdi07BTObaZAxBnrVHpPF5O6n4mv5BKp kb7w== X-Gm-Message-State: AOAM531n66iC+lRR5DbjtR8f84iPLrqkapAhLe12bGVNwW9AFgWnPc21 sfErsNkPiq/mfCgQlJXxpq8XTJey X-Google-Smtp-Source: ABdhPJxs72CiLRMcc/PE9N3oF8dQsR/xREXKgOXCj/TUQ5N58gmtRLD5Jb1XgwMNOREN/P3mPwHINw== X-Received: by 2002:adf:ef4d:: with SMTP id c13mr3576343wrp.198.1597098569401; Mon, 10 Aug 2020 15:29:29 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id m126sm1707452wmf.3.2020.08.10.15.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:28 -0700 (PDT) Message-Id: <456160f3a73bf33e3e696405019996efa99ae379.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:18 +0000 Subject: [PATCH v3 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 Mon Aug 10 22:29:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11708335 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 14EFE739 for ; Mon, 10 Aug 2020 22:29:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEF8120768 for ; Mon, 10 Aug 2020 22:29:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XE6Zn8kU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727977AbgHJW3g (ORCPT ); Mon, 10 Aug 2020 18:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727968AbgHJW3c (ORCPT ); Mon, 10 Aug 2020 18:29:32 -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 ADEB8C061756 for ; Mon, 10 Aug 2020 15:29:31 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id z18so9622760wrm.12 for ; Mon, 10 Aug 2020 15:29: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=CLLkOGBsioA4S1kw3+zkoNT7lH7FDdtowG131CyGeAY=; b=XE6Zn8kUnHIpUlCjOZymNrTBX3a34yc07wQGCzRx7p7ryR+9eJyzNoD8frrAZHYqOx aYSIejk6/AWeSH/XIPoGtNbXKQnmKuEQo7waEs7JBsw6A4aq2UUZzvi9T97BE3Vvyepl Bdg4b78fRgnIOivtU0Z3jzcGUdfJpUxhAuN/qZtCMHRGeijkXvjMU0NwbrNr1wpvq3C9 +3dXkwdEOjHd1TUpTNg9H5mQgGGI6PitazdZEh7z1rdjmp0e8EEGsSZA3tAM429wzU8E nOevT6qdJa2Xddx3JemGuDUAxOn90jDSYChhYwn4CL6U4MxGZK4mApLbf+g45hcXnSIp 1m5w== 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=UVV3XRQBEZcaDjETJxNVe6dOez9w+4AqpjwYdqlPOtwtAyALi01ew0fAbQWuxhL5tt RMAdRxuRTdy0NJ4wH509IjMA9xQhel+O3y+JXW2PFqpHNDQQjp8OHNdcTkXNNYG7gb6U 3LGGUCvqdz7Se4nAiCzUmqgEYrClwThIOzELIr+TRf7F1k2Uv1z0VXb5CRQblv8p+4ib 8GdaUI1k++Lt4OFEwYE8EH0T1vgSv7hDjJ9evZxWIwA7o5/X09BzOLILW0zgzGzhO9Hs I4y1m7KRnLxmntn+esaLMwtbishsAPEGmIHyoPNHqeedXjFXLq5Y+ROKhMDOL5UbSeaN hk5w== X-Gm-Message-State: AOAM531MekfwuekMqDSRhZbgOshX1faqZOVm4Bu7uw+G0ZFtPofNS/Ks B5XNBsZkg7wIVh8r5zna0PB+V7HY X-Google-Smtp-Source: ABdhPJz0rcAJLFKONX41E8uv8RxgIV3Gp5I7XUF/jme6YJydBOrX4JFXr+IAI5ORmoCPZvj1JP4Z3g== X-Received: by 2002:adf:a195:: with SMTP id u21mr28050092wru.296.1597098570207; Mon, 10 Aug 2020 15:29:30 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id g25sm1503412wmh.35.2020.08.10.15.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:29:29 -0700 (PDT) Message-Id: <0c8dcbf01cc7bb78f62291b645d56d344b24e5fd.1597098559.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Elijah Newren via GitGitGadget" Date: Mon, 10 Aug 2020 22:29:19 +0000 Subject: [PATCH v3 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