[PATCH 3/4] blame: do not show boundary commits, only those blamed

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

 



Make the option functional and add tests

Signed-off-by: Philip Oakley <philipoakley@iee.email>
---
 builtin/blame.c  | 1 +
 t/t8002-blame.sh | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/builtin/blame.c b/builtin/blame.c
index b699c777c4..61e5a7ff44 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -475,6 +475,7 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int
 			fputs(color, stdout);
 
 		if (suspect->commit->object.flags & UNINTERESTING) {
+			if (blame_only) continue;
 			if (blank_boundary)
 				memset(hex, ' ', length);
 			else if (!(opt & OUTPUT_ANNOTATE_COMPAT)) {
diff --git a/t/t8002-blame.sh b/t/t8002-blame.sh
index eea048e52c..d4877c7c54 100755
--- a/t/t8002-blame.sh
+++ b/t/t8002-blame.sh
@@ -122,4 +122,11 @@ test_expect_success '--exclude-promisor-objects does not BUG-crash' '
 	test_must_fail git blame --exclude-promisor-objects one
 '
 
+test_expect_success 'test --blame-only, exclude boundary commits' '
+	git blame --blame-only branch1.. -- file >actual &&
+	git blame branch1.. -- file >full &&
+	sed -e "/^\^/d" full >expected &&
+	test_cmp expected actual
+'
+
 test_done
-- 
2.26.2.windows.1.13.g9dddff6983




[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