From patchwork Thu Sep 1 07:08:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 12961895 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 25DFCECAAD2 for ; Thu, 1 Sep 2022 07:09:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233366AbiIAHJR (ORCPT ); Thu, 1 Sep 2022 03:09:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233784AbiIAHIw (ORCPT ); Thu, 1 Sep 2022 03:08:52 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62F35123C19 for ; Thu, 1 Sep 2022 00:08:13 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id ay39-20020a05600c1e2700b003a5503a80cfso853771wmb.2 for ; Thu, 01 Sep 2022 00:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=YsSpKV12dBqc0+C/BVsHCBZP2FhOXS9OlkzNys7p+98=; b=jl2SbsGH6ddx6A6Nas02TVaMy+Nq4ottCe8W00B/mnnRkAb9LMmU2cOfX0Xl06mY7F ALMtvQ/QVekZkjyPhQlRSI4st1YbW+qL1i3Hpa01TTrGTtAG75u5Qc6I/+2a1laBqMEM XfxzbtV0UXPEB/PdYgsjpUt20/bVJGdtmqJRYhScxKnweQy1GhK84wYZXAKEkutNAWRk 20j3uXviGKCBrmyJcO9SbbSYfFSsuOcMicRxDXIcAwaejCFuXJzXVndFEu8uttn+26gl 2onuusXbtMoNA1EUr7q9Kp0UCWQMw5Tplez3gHm225kWCximyc+qFwbWftbjBT24FOTA a3yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=YsSpKV12dBqc0+C/BVsHCBZP2FhOXS9OlkzNys7p+98=; b=wlkf5iD/T0aMY5qtqkhYEknq8ot+foOO8YAje5Q7mWC0Gq79mi1hxlYB2a2cAUqDdb 40e7mvJUOhE6E6D0ei7SgRQM+nI0vQDuu229NTkl1WS7ihkos4kt+2MkySnoAvcRNn6T EX4cJIHonIjKzor3IFvjDxQeR2OYwblUE3wIS+n/FeISbML6wDijbigg9wDsL6zFC9Vs 4hZV/QPIyn6jFzhu9OhEY9y0JgVzBEoFXuV1IeSLyDBHXKNRfTZgxmkUvPDK/Oa/wkaP MFfbpPZ+wSNxEjGXq+42GYRuir6hwTsFgsv4XEDptHnK/dQdVgiVGmeRJibkcf+StDnM tuvg== X-Gm-Message-State: ACgBeo3vgg4yu0wrvNLZMmqJPFWVBotTwyyWrRa4L4CUKvhr5V52KvMP 216XCd0uqpsJdGo6Jwd2qUhMUQ/bFIU= X-Google-Smtp-Source: AA6agR7J1D6B4hKsl7Bl7u/hFHjxv6edy4hbrlGYAHsx2f2JubjB/Z/+4IwRcR2GC3w+vfiqiUi1+A== X-Received: by 2002:a05:600c:1906:b0:3a5:f9e0:fcb6 with SMTP id j6-20020a05600c190600b003a5f9e0fcb6mr4327353wmq.157.1662016091515; Thu, 01 Sep 2022 00:08:11 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id p22-20020a05600c359600b003a604a29a34sm5783548wmq.35.2022.09.01.00.08.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 00:08:10 -0700 (PDT) Message-Id: In-Reply-To: References: Date: Thu, 01 Sep 2022 07:08:05 +0000 Subject: [PATCH v2 1/3] diff: have submodule_format logic avoid additional diff headers Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Philippe Blain , Elijah Newren , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren Commit 95433eeed9 ("diff: add ability to insert additional headers for paths", 2022-02-02) introduced the possibility of additional headers, created in create_filepairs_for_header_only_notifications(). These are represented by inserting additional pairs in diff_queued_diff which always have a mode of 0 and a null_oid. When these were added, one code path was noted to assume that at least one of the diff_filespecs in the pair were valid, and that codepath was corrected. The submodule_format handling is another codepath with the same issue; it would operate on these additional headers and attempt to display them as submodule changes. Prevent that by explicitly checking for both modes being 0. Reported-by: Philippe Blain Signed-off-by: Elijah Newren --- diff.c | 14 +++++++++++--- t/t4069-remerge-diff.sh | 8 ++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index 974626a6211..d672efed7ab 100644 --- a/diff.c +++ b/diff.c @@ -3398,6 +3398,12 @@ static void add_formatted_headers(struct strbuf *msg, line_prefix, meta, reset); } +static int diff_filepair_is_phoney(struct diff_filespec *one, + struct diff_filespec *two) +{ + return !DIFF_FILE_VALID(one) && !DIFF_FILE_VALID(two); +} + static void builtin_diff(const char *name_a, const char *name_b, struct diff_filespec *one, @@ -3429,14 +3435,16 @@ static void builtin_diff(const char *name_a, if (o->submodule_format == DIFF_SUBMODULE_LOG && (!one->mode || S_ISGITLINK(one->mode)) && - (!two->mode || S_ISGITLINK(two->mode))) { + (!two->mode || S_ISGITLINK(two->mode)) && + (!diff_filepair_is_phoney(one, two))) { show_submodule_diff_summary(o, one->path ? one->path : two->path, &one->oid, &two->oid, two->dirty_submodule); return; } else if (o->submodule_format == DIFF_SUBMODULE_INLINE_DIFF && (!one->mode || S_ISGITLINK(one->mode)) && - (!two->mode || S_ISGITLINK(two->mode))) { + (!two->mode || S_ISGITLINK(two->mode)) && + (!diff_filepair_is_phoney(one, two))) { show_submodule_inline_diff(o, one->path ? one->path : two->path, &one->oid, &two->oid, two->dirty_submodule); @@ -3456,7 +3464,7 @@ static void builtin_diff(const char *name_a, b_two = quote_two(b_prefix, name_b + (*name_b == '/')); lbl[0] = DIFF_FILE_VALID(one) ? a_one : "/dev/null"; lbl[1] = DIFF_FILE_VALID(two) ? b_two : "/dev/null"; - if (!DIFF_FILE_VALID(one) && !DIFF_FILE_VALID(two)) { + if (diff_filepair_is_phoney(one, two)) { /* * We should only reach this point for pairs from * create_filepairs_for_header_only_notifications(). For diff --git a/t/t4069-remerge-diff.sh b/t/t4069-remerge-diff.sh index 9e7cac68b1c..e3e6fbd97b2 100755 --- a/t/t4069-remerge-diff.sh +++ b/t/t4069-remerge-diff.sh @@ -185,6 +185,14 @@ test_expect_success 'remerge-diff w/ diff-filter=U: all conflict headers, no dif test_cmp expect actual ' +test_expect_success 'submodule formatting ignores additional headers' ' + # Reuses "expect" from last testcase + + git show --oneline --remerge-diff --diff-filter=U --submodule=log >tmp && + sed -e "s/[0-9a-f]\{7,\}/HASH/g" tmp >actual && + test_cmp expect actual +' + test_expect_success 'remerge-diff w/ diff-filter=R: relevant file + conflict header' ' git log -1 --oneline resolution >tmp && cat <<-EOF >>tmp && From patchwork Thu Sep 1 07:08:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 12961896 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 3C56AECAAD2 for ; Thu, 1 Sep 2022 07:09:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232176AbiIAHJU (ORCPT ); Thu, 1 Sep 2022 03:09:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233791AbiIAHIz (ORCPT ); Thu, 1 Sep 2022 03:08:55 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EC46122692 for ; Thu, 1 Sep 2022 00:08:15 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id u18so8386383wrq.10 for ; Thu, 01 Sep 2022 00:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=yBOFLcaherWCrpl3l7ZUl5EHvaEiO22gm/7/JrXSbwU=; b=oQ1CSBTp+CnNVqV1VJgIbzB/tMS2gqgRPzQxkqXH6M5t5DONl4vpG32jdtR+TaDxRN f19JkX+ZnZpV86NF2hJ7dhCpNvqQq7T1yTWq7KMOrdNT62MD6IQqpPV9iisfZWY7CbpJ xddq/NvT60ae8Gr11ffOX2/ebp5xMy5Eo4IEONZY4jkTg3E9VhQnT/QsVOlKqBs4s+pS hE4lflOoPFYd2q9wOKBGoeYFZrZLwqAjeXtw33ZwyOqlursfqqm/FRippWLupGuUV9SA 0TS2n+PKQhCA+WKExPpaScWmfUmHWXWqxWtq8I1ZnM40WhYHepIOBENYpYiABRQqPo82 r7ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=yBOFLcaherWCrpl3l7ZUl5EHvaEiO22gm/7/JrXSbwU=; b=XgKLG3Wumk3bcCccvvK4YSJW5S5Y4yR6LDXNLLHWjYbRTLjvf1kfaFUkfazc89+LTF CV/m9XeTIzlX9UrW9Utz5Uclf0ndh6C1N8ycMxHdjFGn07bdJOc73ghOvDQpfmzlLwJH 8VjKUHKKeMtYVcKIYdHbPCsTkQ5N6qJnO9rietahdst8ygGt/HcW7dUG1lJ+vUduwFWV +uphP7VAWyEHc/D8bGU8DiMzuMIaTPvY207wNDapMfXr9PqJEZO0QAjkwHwTD3KW6YDx jSbaY3dh8696Xf7kPZIGvaAov9YC+YcbIPMKgyoMtpdtsLjHHL4YClLehDNA1yFTGUlC CFew== X-Gm-Message-State: ACgBeo2m7ChHF0NXnvLB8Fn99B2TU4kwpClmClF1F//FL+4Ej2TqhP2m HgZCdP2CM8b6/ITTFsMSXy6p06fQaRc= X-Google-Smtp-Source: AA6agR5y9LycCqiuhkoqmL0bxmCDAMG0d5pAqwGQbqKfJ/0abi9QX2wHO8NyquR8Bh26nkN4y4YQOg== X-Received: by 2002:a5d:47c9:0:b0:226:eb05:ecbc with SMTP id o9-20020a5d47c9000000b00226eb05ecbcmr4055762wrc.74.1662016093299; Thu, 01 Sep 2022 00:08:13 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id q185-20020a1c43c2000000b003a5f783abb8sm4252485wma.30.2022.09.01.00.08.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 00:08:12 -0700 (PDT) Message-Id: <3bd622d5b45d05b89de73536ae948ea4e24f9505.1662016088.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Thu, 01 Sep 2022 07:08:06 +0000 Subject: [PATCH v2 2/3] diff: fix filtering of additional headers under --remerge-diff Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Philippe Blain , Elijah Newren , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren Commit 95433eeed9 ("diff: add ability to insert additional headers for paths", 2022-02-02) introduced the possibility of additional headers. Because there could be conflicts with no content differences (e.g. a modify/delete conflict resolved in favor of taking the modified file as-is), that commit also modified the diff_queue_is_empty() and diff_flush_patch() logic to ensure these headers were included even if there was no associated content diff. However, when the pickaxe is active, we really only want the remerge conflict headers to be shown when there is an associated content diff. Adjust the logic in these two functions accordingly. This also removes the TEST_PASSES_SANITIZE_LEAK=true declaration from t4069, as there is apparently some kind of memory leak with the pickaxe code. Signed-off-by: Elijah Newren --- diff.c | 2 ++ t/t4069-remerge-diff.sh | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/diff.c b/diff.c index d672efed7ab..85905261ce4 100644 --- a/diff.c +++ b/diff.c @@ -5860,6 +5860,7 @@ static void diff_flush_patch(struct diff_filepair *p, struct diff_options *o) { int include_conflict_headers = (additional_headers(o, p->one->path) && + !o->pickaxe_opts && (!o->filter || filter_bit_tst(DIFF_STATUS_UNMERGED, o))); /* @@ -5915,6 +5916,7 @@ int diff_queue_is_empty(struct diff_options *o) int i; int include_conflict_headers = (o->additional_path_headers && + !o->pickaxe_opts && (!o->filter || filter_bit_tst(DIFF_STATUS_UNMERGED, o))); if (include_conflict_headers) diff --git a/t/t4069-remerge-diff.sh b/t/t4069-remerge-diff.sh index e3e6fbd97b2..95a16d19aec 100755 --- a/t/t4069-remerge-diff.sh +++ b/t/t4069-remerge-diff.sh @@ -2,7 +2,6 @@ test_description='remerge-diff handling' -TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh # This test is ort-specific @@ -90,6 +89,22 @@ test_expect_success 'remerge-diff with both a resolved conflict and an unrelated test_cmp expect actual ' +test_expect_success 'pickaxe still includes additional headers for relevant changes' ' + # reuses "expect" from the previous testcase + + git log --oneline --remerge-diff -Sacht ab_resolution >tmp && + sed -e "s/[0-9a-f]\{7,\}/HASH/g" tmp >actual && + test_cmp expect actual +' + +test_expect_success 'can filter out additional headers with pickaxe' ' + git show --remerge-diff --submodule=log --find-object=HEAD ab_resolution >actual && + test_must_be_empty actual && + + git show --remerge-diff -S"not present" --all >actual && + test_must_be_empty actual +' + test_expect_success 'setup non-content conflicts' ' git switch --orphan base && From patchwork Thu Sep 1 07:08:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elijah Newren X-Patchwork-Id: 12961897 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 35914ECAAD1 for ; Thu, 1 Sep 2022 07:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232853AbiIAHJX (ORCPT ); Thu, 1 Sep 2022 03:09:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233796AbiIAHI6 (ORCPT ); Thu, 1 Sep 2022 03:08:58 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 729F912205E for ; Thu, 1 Sep 2022 00:08:16 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id v16so18322567wrm.8 for ; Thu, 01 Sep 2022 00:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc; bh=E0aGUFG6eZNOA3RgnVzdQdu9rzC1KBfbb2w+H7CLKJM=; b=MiX269tpxsvyr5KqADk7h9B6FpkIG3OIyBGaajiDnwMc+bXr2/Ns25lGq9UuU9aBFV Sc1OZc79A4LLOWs03Y3E1svG5QPUjcIfyP/H4Qy9StfHaBI93yGkM9ff10QefC0SmgWl 0hT9x8wfQWODZz2Yeazpur+XqaNF8eToqqrUCGARZq/7Szd/4abS9rt1XtsvVUfxlMtJ xEeW0Xezvrcbey5jL40MtkwCsGgVGI0IMvzM+ZOHZdnp3DaaIeAyybFF5CsEm0EagTGG 0izrTSZBl2QZgQ9DIJBl3wKq9xkuJakGTkgzgaRTTIrZceqTV9YMjfJ25EZQicky7f4q ULbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc; bh=E0aGUFG6eZNOA3RgnVzdQdu9rzC1KBfbb2w+H7CLKJM=; b=aKQwsLmgo9ybfaDkIPjvK4zavqLcQq+cXn+Oqykn7Hdcr2MToykxnZmrZvSKunS+y9 gq4MDdpXc3HDelMHnlg5ufU156KmbSlbGdc/0+FzrtoPzN/TworQiCOZHbpOphMe36Ca EgsecTqcALaofwDCROjK+kg4BpTh3SoQzH9TzovTKaUTUJBtb535YLKx9TAR4aHFX+C4 FXkj1fQJgDl4GRb1O69nUQFAwN25SmwzpqCCkmT3F7npgEaGllHnnOQrMwLeqFjiQXAy 3JNhxW4QZqYseqRX0rU/e8xSI8ICSWC/VGmoC7QRbL+1+S8TtMTWgzSLEMKf0inCqp7s KRDw== X-Gm-Message-State: ACgBeo0NfY0pHehEfFZo8uNt53ZLDnVRrNHWC/ZQldhCita8kVik4o81 jlCxeMjCHOULiapQnJVXNjaqe275yXw= X-Google-Smtp-Source: AA6agR5v3pNz4In37hiG1KdyLtvxE3IjMP0QMYDNSIlbAeM+CbFGh8ziwRaD0z3McHM2wxA3NYThMw== X-Received: by 2002:adf:fe44:0:b0:226:da5d:990 with SMTP id m4-20020adffe44000000b00226da5d0990mr10975810wrs.334.1662016094536; Thu, 01 Sep 2022 00:08:14 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id bq13-20020a5d5a0d000000b00226fa6cf1d3sm284558wrb.7.2022.09.01.00.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 00:08:13 -0700 (PDT) Message-Id: <7903f8380dc512ba827209ba3b152d0784df7b60.1662016088.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Thu, 01 Sep 2022 07:08:07 +0000 Subject: [PATCH v2 3/3] diff: fix filtering of merge commits under --remerge-diff Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Philippe Blain , Elijah Newren , Elijah Newren , Elijah Newren Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Elijah Newren From: Elijah Newren Commit 95433eeed9 ("diff: add ability to insert additional headers for paths", 2022-02-02) introduced the possibility of additional headers. Because there could be conflicts with no content differences (e.g. a modify/delete conflict resolved in favor of taking the modified file as-is), that commit also modified the diff_queue_is_empty() and diff_flush_patch() logic to ensure these headers were included even if there was no associated content diff. However, the added logic was a bit inconsistent between these two functions. diff_queue_is_empty() overlooked the fact that the additional headers strmap could be non-NULL and empty, which would cause it to display commits that should have been filtered out. Fix the diff_queue_is_empty() logic to also account for additional_path_headers being empty. Reported-by: Philippe Blain Signed-off-by: Elijah Newren --- diff.c | 1 + t/t4069-remerge-diff.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/diff.c b/diff.c index 85905261ce4..5ea9071ff07 100644 --- a/diff.c +++ b/diff.c @@ -5916,6 +5916,7 @@ int diff_queue_is_empty(struct diff_options *o) int i; int include_conflict_headers = (o->additional_path_headers && + strmap_get_size(o->additional_path_headers) && !o->pickaxe_opts && (!o->filter || filter_bit_tst(DIFF_STATUS_UNMERGED, o))); diff --git a/t/t4069-remerge-diff.sh b/t/t4069-remerge-diff.sh index 95a16d19aec..07323ebafe0 100755 --- a/t/t4069-remerge-diff.sh +++ b/t/t4069-remerge-diff.sh @@ -56,6 +56,11 @@ test_expect_success 'remerge-diff on a clean merge' ' test_cmp expect actual ' +test_expect_success 'remerge-diff on a clean merge with a filter' ' + git show --oneline --remerge-diff --diff-filter=U bc_resolution >actual && + test_must_be_empty actual +' + test_expect_success 'remerge-diff with both a resolved conflict and an unrelated change' ' git log -1 --oneline ab_resolution >tmp && cat <<-EOF >>tmp &&