[PATCH 3/3] range-diff: use --no-notes to generate patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When a commit being range-diff'd has a note attached to it, the note
will be compared as well. However, this shouldn't happen since the
purpose of range-diff is to compare the difference between two
commit-ranges and, since the note attached to a commit is mutable, they
shouldn't be included as part of the comparison.

Add `--no-notes` to the `git log` call and mark the corresponding test
as passing.

Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx>
---
 range-diff.c          | 2 +-
 t/t3206-range-diff.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/range-diff.c b/range-diff.c
index 7fed5a3b4b..725930ee92 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -52,7 +52,7 @@ static int read_patches(const char *range, struct string_list *list)
 
 	argv_array_pushl(&cp.args, "log", "--no-color", "-p", "--no-merges",
 			"--reverse", "--date-order", "--decorate=no",
-			"--no-prefix",
+			"--no-prefix", "--no-notes",
 			/*
 			 * Choose indicators that are not used anywhere
 			 * else in diffs, but still look reasonable
diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index 29b9a6f854..671703f85b 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -505,7 +505,7 @@ test_expect_success 'range-diff overrides diff.noprefix internally' '
 	git -c diff.noprefix=true range-diff HEAD^...
 '
 
-test_expect_failure 'range-diff does not compare notes' '
+test_expect_success 'range-diff does not compare notes' '
 	git notes add -m "topic note" topic &&
 	git notes add -m "unmodified note" unmodified &&
 	test_when_finished git notes remove topic unmodified &&
-- 
2.24.0.420.g9ac4901264





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux