From patchwork Wed May 10 21:37:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 13237273 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D124C7EE24 for ; Wed, 10 May 2023 21:37:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235995AbjEJVhq (ORCPT ); Wed, 10 May 2023 17:37:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235984AbjEJVhp (ORCPT ); Wed, 10 May 2023 17:37:45 -0400 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCAF43A85 for ; Wed, 10 May 2023 14:37:42 -0700 (PDT) Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-38eb2984c82so2482305b6e.0 for ; Wed, 10 May 2023 14:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683754662; x=1686346662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H2mypDID86Kunng8ttVxBtlQfgst4TSeerm2KjpuNcg=; b=T4hvptE5k9p6KnoaXewFD5pUXmLtyVrMal1TnAxX9lNBUsSM5ktnE0VSxy6U9UsDTX /ZzRVhzmfOc8xSQ0JOwY+MrloRNxQ8ufT7oswbeaNBZ4TDXn4lxM3sZPKz6GBj8VerEP Limo5WitfSA3V6Pq42agIqPtqRhBQZh52/X58Om3b6A2BppYtd7doFa3w0qD5VIMGxH1 6oWHCYMqCY4fh0eZKArpE/tXh36r/dXhWjlL/fl7jvqS6ZMpF+JWsQysd89lFdfj5Jmg nV/v8P5zhwERkI2kBCBktAAfpR9DLQSTj7iitu7YGpDUQKGgwCYJnGd+qnSMolf//+tC Y8hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683754662; x=1686346662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H2mypDID86Kunng8ttVxBtlQfgst4TSeerm2KjpuNcg=; b=Bo0ecHYCYua/n9KY0Hruk9OCdcJJHk6VMTNGunZZbhnURpF0ggyqzEfFeO94PeWQfV BV0/+uvZr0r+KgfxtrRV7eO6KspPCV68Kwlw8XKTRrmQrQZZoR7OJG8hsz7DdEBOH6Ez dQRLpulLMAY50HcM9G0OnOQ7YU7R6cdVW1cayAayjlP3GiPKQRuxxrG7Bw2KQlrLLlwo HDRzmzC5au2DmHddN6oTziIsoE1pT80nEdgbt3fXcsCUk18TdIoLJK7eFI5OlLzVIirn rIylHMoNrVd1o4T/l6kfAKAnnBRblAOdfVBV+vo7G46ljpqkVQr8xcxOrAriT4dQljK2 Gx9w== X-Gm-Message-State: AC+VfDz4xMmUUnj+Ov+DDmX8vc4v0buLy75BIdTHab3757SOkSJwcKdR VWG0yw7h+65f1/croIr6Osrk7IiVHGY= X-Google-Smtp-Source: ACHHUZ4UjJHtguLkcRuSYlZcwXqQhZ45KJ67oIBendqxphcScuo360z9fFcnVV7m4az+67K0RMzRZw== X-Received: by 2002:a05:6808:903:b0:38e:909e:86cf with SMTP id w3-20020a056808090300b0038e909e86cfmr3800699oih.32.1683754661835; Wed, 10 May 2023 14:37:41 -0700 (PDT) Received: from localhost ([2806:2f0:4000:e8a3:4ae7:daff:fe31:3285]) by smtp.gmail.com with ESMTPSA id q66-20020acac045000000b0038c0cf168afsm2739056oif.7.2023.05.10.14.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 14:37:41 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Phillip Wood , Eric Sunshine , Derrick Stolee , Felipe Contreras Subject: [PATCH v3 1/4] test: add merge style config test Date: Wed, 10 May 2023 15:37:35 -0600 Message-Id: <20230510213738.505241-2-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.40.0+fc1 In-Reply-To: <20230510213738.505241-1-felipe.contreras@gmail.com> References: <20230510213738.505241-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org We want to test different combinations of merge.conflictstyle, and a new file is the best place to do that. Signed-off-by: Felipe Contreras --- t/t6440-config-conflict-markers.sh | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 t/t6440-config-conflict-markers.sh diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh new file mode 100755 index 0000000000..813d7dda9a --- /dev/null +++ b/t/t6440-config-conflict-markers.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +test_description='merge style conflict markers configurations' + +. ./test-lib.sh + +test_expect_success 'merge' ' + test_create_repo merge && + ( + cd merge && + + test_write_lines 1 2 3 >content && + git add content && + git commit -m base && + + git checkout -b r && + echo six >>content && + git commit -a -m right && + + git checkout master && + echo 7 >>content && + git commit -a -m left && + + test_must_fail git merge r && + ! grep "^|||||||" content && + + git reset --hard && + test_must_fail git -c merge.conflictstyle=diff3 merge r && + grep "^|||||||" content && + + git reset --hard && + test_must_fail git -c merge.conflictstyle=merge merge r && + ! grep "^|||||||" content + ) +' + +test_done From patchwork Wed May 10 21:37:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 13237274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94BEAC7EE22 for ; Wed, 10 May 2023 21:37:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236092AbjEJVhv (ORCPT ); Wed, 10 May 2023 17:37:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236008AbjEJVhq (ORCPT ); Wed, 10 May 2023 17:37:46 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A8253A80 for ; Wed, 10 May 2023 14:37:44 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-1928ec49077so6252824fac.0 for ; Wed, 10 May 2023 14:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683754663; x=1686346663; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C5AkklYVZdEowsffJADb+bt3l3VpYsTpEGD1yWjfvgI=; b=BlIoiPp2vpBmREQUyEbazCUJvh3RCSaxUDTzG/K18isrSMxf9pNoE0uM/LYv+pby71 XWgomIfdfOypdNJ6veO4+QieS3sTOcu7sKu4JR/ZjMMhhQ1iIVM7zpZvdvE9msRkv8AO qEZOOFRQXRBEo8c/A5kigyPY9sbp7DUq2xbuRhMPGofAWvk0c7SMsFgu+7F3MqbwdKjW V/1QxkYRv9b7pjaH7zsxVYU40pIH0/i4zTM8VNgI5+VnIOme8HdA7trSR2tzaFDHez2D M2opQpXm+6b4CdyXTKIbFJDtEVDWud/+2rKd+hfBYFNwGBJ+Hdz474UTi9qo3osXwXPX 0j5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683754663; x=1686346663; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C5AkklYVZdEowsffJADb+bt3l3VpYsTpEGD1yWjfvgI=; b=ei2wdgdR/srgrW+nXPe108S2PnVQa166SRD6GBzYKUMYgjHVkFRjBj12NvrAdVP5QG CBNMs4xKGASrbQ3fp2+3VxYf2pnubGY1Imd1dy2vVvYn9hNctnm6jzH7Qp2qXV4cjyRm FITFmfWIPaqAYoPpNFX8FflCpDHN7WPH6BoMOgRJLKVUxY+MYCjhyBFWFW3hFA0/73/R Zf3NQmIau0k8hOr6Jd/GToGesoDEtXLYT5eUAMEqRdVppFIqbQiloXgXSQUTcWtOYu+F qMJQl/hNb6YIbfAtS0f8vRH5ItzRDj7V0gqOJz8M7VREFLH4gl5DAdnOSAwtaCBsC96F Jvgw== X-Gm-Message-State: AC+VfDzQYXV2gQ/tjgtT/I5QLkZh4PURQ50/SIcX90tZsFVqWEQ1slil M47pXBg6ydP8I2EdrU1IVBQUGxVVkz8= X-Google-Smtp-Source: ACHHUZ5a0DEY/apzDHXnhCAykLmMa2kTEFQvq58Dg0ajXPWdZsoOTTy7mEXHijfyMZmt+V7xYHLHpA== X-Received: by 2002:a05:6870:a2c2:b0:192:8551:6d39 with SMTP id w2-20020a056870a2c200b0019285516d39mr8951539oak.55.1683754663238; Wed, 10 May 2023 14:37:43 -0700 (PDT) Received: from localhost ([2806:2f0:4000:e8a3:4ae7:daff:fe31:3285]) by smtp.gmail.com with ESMTPSA id j16-20020a9d7690000000b006a6558ef17fsm6662718otl.30.2023.05.10.14.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 14:37:42 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Phillip Wood , Eric Sunshine , Derrick Stolee , Felipe Contreras Subject: [PATCH v3 2/4] merge-tree: fix merge.conflictstyle handling Date: Wed, 10 May 2023 15:37:36 -0600 Message-Id: <20230510213738.505241-3-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.40.0+fc1 In-Reply-To: <20230510213738.505241-1-felipe.contreras@gmail.com> References: <20230510213738.505241-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Currently it's completely ignored. Signed-off-by: Felipe Contreras --- builtin/merge-tree.c | 4 ++++ t/t6440-config-conflict-markers.sh | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index aa8040c2a6..a98f84634e 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -17,6 +17,8 @@ #include "merge-blobs.h" #include "quote.h" #include "tree.h" +#include "config.h" +#include "xdiff-interface.h" static int line_termination = '\n'; @@ -628,6 +630,8 @@ int cmd_merge_tree(int argc, const char **argv, const char *prefix) if (argc != expected_remaining_argc) usage_with_options(merge_tree_usage, mt_options); + git_config(git_xmerge_config, NULL); + /* Do the relevant type of merge */ if (o.mode == MODE_REAL) return real_merge(&o, merge_base, argv[0], argv[1], prefix); diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh index 813d7dda9a..cb2ee3ad0a 100755 --- a/t/t6440-config-conflict-markers.sh +++ b/t/t6440-config-conflict-markers.sh @@ -34,4 +34,25 @@ test_expect_success 'merge' ' ) ' +test_expect_success 'merge-tree' ' + test_create_repo merge-tree && + ( + cd merge-tree && + + test_commit initial initial-file initial && + test_commit r content r && + git reset --hard initial && + test_commit l content l && + + git merge-tree initial r l >actual && + ! grep "^+|||||||" content && + + git -c merge.conflictstyle=diff3 merge-tree initial r l >actual && + grep "^+|||||||" actual && + + git -c merge.conflictstyle=merge merge-tree initial r l >actual && + ! grep "^+|||||||" content + ) +' + test_done From patchwork Wed May 10 21:37:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 13237276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86B66C7EE22 for ; Wed, 10 May 2023 21:37:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236072AbjEJVhz (ORCPT ); Wed, 10 May 2023 17:37:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236032AbjEJVhq (ORCPT ); Wed, 10 May 2023 17:37:46 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6583D3A85 for ; Wed, 10 May 2023 14:37:45 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6aaf52ff35bso4468517a34.2 for ; Wed, 10 May 2023 14:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683754664; x=1686346664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LYyJGzjoRZ/uu0tJQ7EXjIEHDeIgQCWUxmFSOXU9W2E=; b=ZrNsuSfsRIRUcAUVxXjpFClsJl/gDup/VOba8sivts7EyvTV85r3kpgYS/U/PG4hmA USND5EcR9fsiYJuT5Vw6FHVwssowclBhymk53Q1lmULhJMCR3HwrLqfzKGxwWg/iDzmw sGwtBGgclMF6aUdtLveeIh6BZBSoyFqx94hudqiLvpjDuG/YOTRAwy518mDfaNsle9QO 1gtBOM/PlhuHtH5UMyYVFUY/vd93Xx3kGNiK91zEZgjNkjpF0ipHlrXOh2SsZBS8Jg1w gNKsTt+Iu2GZelFN7kvRH7u2L+Tr9ItbB6esVc5TFmkzZjzLRIjSNahA5hYCgfzYRlKm k3uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683754664; x=1686346664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LYyJGzjoRZ/uu0tJQ7EXjIEHDeIgQCWUxmFSOXU9W2E=; b=XVU3kCPIRiaoOfKG+Tfm9MAGtDuL/XHil66jVz9uZG4ngrVnH2tU/wu+ZhAFmOBizM RMi4yA995x8MzUd77N2cVFdrfj7ezuqBUTraTtxjnfCgvZDl9nz/KOBX/DnLBLYA8H4i Ig/TtLOltWQ3dtGQKnQiwpzaSFJRAHD/9PIllDwd4SadxGPfZmNr4DTNEeFquhyJrI6W QgbmGpuxbI7Tc4R+ma2DFcQvgCzGBShRcaeZxo9z+cu4hshCGrsQ8/b+USi1NXE1NUXT lYrCin+hK3cIxiqsTRQ7SbPL+OLs9NaOTqdc7IRMZ9jW7c2vEBbWNHe7I+EadAq8SWGP BGPA== X-Gm-Message-State: AC+VfDzwVXWDmbve6EpclXk5aIfYZhvWseCTd17Y0uGCoZMUunkd1ZRC FaJU4aCvRAK5t4h5dju+B/CkFpTjuic= X-Google-Smtp-Source: ACHHUZ48qzgIdruHiH+IgHJk4/LDITxVP1HdUxQP0CSIef/D8g6gJRyt/6uAR8wos2y70cTH4tQCUw== X-Received: by 2002:a9d:6d98:0:b0:6ab:1d86:e4a5 with SMTP id x24-20020a9d6d98000000b006ab1d86e4a5mr3562552otp.25.1683754664516; Wed, 10 May 2023 14:37:44 -0700 (PDT) Received: from localhost ([2806:2f0:4000:e8a3:4ae7:daff:fe31:3285]) by smtp.gmail.com with ESMTPSA id dj8-20020a0568303a8800b006ab2af64f34sm1286093otb.13.2023.05.10.14.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 14:37:44 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Phillip Wood , Eric Sunshine , Derrick Stolee , Felipe Contreras Subject: [PATCH v3 3/4] notes: fix merge.conflictstyle handling Date: Wed, 10 May 2023 15:37:37 -0600 Message-Id: <20230510213738.505241-4-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.40.0+fc1 In-Reply-To: <20230510213738.505241-1-felipe.contreras@gmail.com> References: <20230510213738.505241-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Currently it's completely ignored. Signed-off-by: Felipe Contreras --- builtin/notes.c | 3 ++- t/t6440-config-conflict-markers.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/builtin/notes.c b/builtin/notes.c index d5788352b6..9a9044b50b 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -28,6 +28,7 @@ #include "notes-utils.h" #include "worktree.h" #include "write-or-die.h" +#include "xdiff-interface.h" static const char * const git_notes_usage[] = { N_("git notes [--ref ] [list []]"), @@ -1020,7 +1021,7 @@ int cmd_notes(int argc, const char **argv, const char *prefix) OPT_END() }; - git_config(git_default_config, NULL); + git_config(git_xmerge_config, NULL); argc = parse_options(argc, argv, prefix, options, git_notes_usage, PARSE_OPT_SUBCOMMAND_OPTIONAL); if (!fn) { diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh index cb2ee3ad0a..c51512ced6 100755 --- a/t/t6440-config-conflict-markers.sh +++ b/t/t6440-config-conflict-markers.sh @@ -55,4 +55,31 @@ test_expect_success 'merge-tree' ' ) ' +test_expect_success 'notes' ' + test_create_repo notes && + ( + test_commit initial && + + git -c core.notesRef=refs/notes/b notes add -m b initial && + + git update-ref refs/notes/r refs/notes/b && + git -c core.notesRef=refs/notes/r notes add -f -m r initial && + + git update-ref refs/notes/l refs/notes/b && + git config core.notesRef refs/notes/l && + git notes add -f -m l initial && + + test_must_fail git notes merge r && + ! grep "^|||||||" .git/NOTES_MERGE_WORKTREE/* && + + git notes merge --abort && + test_must_fail git -c merge.conflictstyle=diff3 notes merge r && + grep "^|||||||" .git/NOTES_MERGE_WORKTREE/* && + + git notes merge --abort && + test_must_fail git -c merge.conflictstyle=merge notes merge r && + ! grep "^|||||||" .git/NOTES_MERGE_WORKTREE/* + ) +' + test_done From patchwork Wed May 10 21:37:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 13237275 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C37DAC77B7C for ; Wed, 10 May 2023 21:37:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236192AbjEJVhw (ORCPT ); Wed, 10 May 2023 17:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236051AbjEJVhr (ORCPT ); Wed, 10 May 2023 17:37:47 -0400 Received: from mail-oa1-x30.google.com (mail-oa1-x30.google.com [IPv6:2001:4860:4864:20::30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58EAE3C02 for ; Wed, 10 May 2023 14:37:46 -0700 (PDT) Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-1929818d7faso47261103fac.0 for ; Wed, 10 May 2023 14:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683754665; x=1686346665; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3KXdjw0PgEHcPlTXUiCk1KHMUozzOt/ma348ZDoKqHc=; b=eTlI4nu/BDqYaOfGcJOOv6FfZCwFxYf0Bn30gHqQRNPKhpydBRcnKvNrZiaLB3l3Hn kMAzRmrUqKWdxaLcl5KoNO9DU9BNkFAo1IiinyN62SV9dwTMKlSsTHs+7nUGdVRLXnen T+mWH0Asz6HeHuCzblZhdF9FQmORRIC3sU08zESu1q5GvCBaB40OdASQ2WFPCgwt+sv1 7TWQi+1B+oZxhdzvM6WuEBJACD2wz8l0UZcRFUdAKnSNJpG+9Z1gOPUINhVx29Gn+Q/x LcLQ5b/9qXnnF//Z+EZhixJBJ+/pNZMzsssixaaDesRtMCYssOep8ofKRTcJlIxqY0l9 dDJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683754665; x=1686346665; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3KXdjw0PgEHcPlTXUiCk1KHMUozzOt/ma348ZDoKqHc=; b=FO2QNT+NTjaQiWAEslwo7kS3U4eynYOFpakRCcba/N+QUJ7FaXHoqEB5rdWC4EgqHz w5ty61nuKcP/93q6lAJLO2ti6CYeMWOEBGBE7oN0sD+HR9l2WLPA+EVzY+nzt5btb9Z7 07+gLqC3B4ERN2/v2bFA2+mCZYITweE76NLBQiY0fJd/XRVQJYy4tcl4XAazK+za40cs QIGIomF07AfIKGkg4IsbdNYOGPtWoZ2tfvzLhB0EL1Bk+zt7NKouvZlh2FWP8bumPjrQ oPYheIy5jLU+cY1ZxH/x2Y3Bcrp2+jUdNVM1frE6sJOTNd1PeOTRwvKFyzvq/UwnDA87 Ix0g== X-Gm-Message-State: AC+VfDwdGQwayF2Vw1eZ4LtIvn2pxi5Gl/xudEuinesqOikOKUJhwHj1 v+4HhyQptlFL5D77RkbX5jDHo6SC0OI= X-Google-Smtp-Source: ACHHUZ6kJJjgGRuFyw2RGKFTdrxvNfYHFE1CZlAS1NBsGfCpB6SSK+Lbynzu5Qtec8SL4cMu9PNukA== X-Received: by 2002:aca:d987:0:b0:390:5cee:53e0 with SMTP id q129-20020acad987000000b003905cee53e0mr3630295oig.23.1683754665733; Wed, 10 May 2023 14:37:45 -0700 (PDT) Received: from localhost ([2806:2f0:4000:e8a3:4ae7:daff:fe31:3285]) by smtp.gmail.com with ESMTPSA id f2-20020a4abb02000000b0054f5b9290ffsm4200740oop.34.2023.05.10.14.37.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 14:37:45 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Phillip Wood , Eric Sunshine , Derrick Stolee , Felipe Contreras Subject: [PATCH v3 4/4] test: document broken merge.conflictStyle handling Date: Wed, 10 May 2023 15:37:38 -0600 Message-Id: <20230510213738.505241-5-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.40.0+fc1 In-Reply-To: <20230510213738.505241-1-felipe.contreras@gmail.com> References: <20230510213738.505241-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Currently both merge.conflictStyle and --conflict=diff3 don't work together for `git commit --merge`, since the former wrongly overrides the later. There is no easy way to fix this, so mark it as broken for now. Signee-off-by: Felipe Contreras --- t/t6440-config-conflict-markers.sh | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/t/t6440-config-conflict-markers.sh b/t/t6440-config-conflict-markers.sh index c51512ced6..3ba993a6a8 100755 --- a/t/t6440-config-conflict-markers.sh +++ b/t/t6440-config-conflict-markers.sh @@ -82,4 +82,35 @@ test_expect_success 'notes' ' ) ' +test_expect_failure 'checkout' ' + test_create_repo checkout && + ( + test_commit checkout && + + test_write_lines a b c d e >content && + git add content && + git commit -m initial && + + git checkout -b simple master && + test_write_lines a c e >content && + git commit -a -m simple && + + test_write_lines b d >content && + git checkout --merge master && + ! grep "^|||||||" content && + + git config merge.conflictstyle merge && + + git checkout -f simple && + test_write_lines b d >content && + git checkout --merge --conflict=diff3 master && + grep "^|||||||" content && + + git checkout -f simple && + test_write_lines b d >content && + git checkout --merge --conflict=merge master && + ! grep "^|||||||" content + ) +' + test_done