[PATCH 1/2] log: test --decorate-refs-exclude with --simplify-by-decoration
To
Junio C Hamano
Cc
Étienne SERVAIS
git@vger.kernel.org
Rafael Ascensão
From
René Scharfe
See Also
Prev Ref 1 Ref 2 Ref 3 Ref 4 Ref 5 Ref 6
Date
2019-09-08 17:58:41 UTC
Demonstrate that a decoration filter given with --decorate-refs-exclude
is inadvertently overruled by --simplify-by-decoration.

Reported-by: Étienne SERVAIS <etienne.servais@voucoux.fr>
Signed-off-by: René Scharfe <l.s.r@web.de>
---
 t/t4202-log.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index c20209324c..01c95d1375 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -837,6 +837,21 @@ test_expect_success 'decorate-refs and decorate-refs-exclude' '
 	test_cmp expect.decorate actual
 '

+test_expect_failure 'decorate-refs-exclude and simplify-by-decoration' '
+	cat >expect.decorate <<-\EOF &&
+	Merge-tag-reach (HEAD -> master)
+	reach (tag: reach, reach)
+	seventh (tag: seventh)
+	Merge-branch-tangle
+	Merge-branch-side-early-part-into-tangle (tangle)
+	tangle-a (tag: tangle-a)
+	EOF
+	git log -n6 --decorate=short --pretty="tformat:%f%d" \
+		--decorate-refs-exclude="*octopus*" \
+		--simplify-by-decoration >actual &&
+	test_cmp expect.decorate actual
+'
+
 test_expect_success 'log.decorate config parsing' '
 	git log --oneline --decorate=full >expect.full &&
 	git log --oneline --decorate=short >expect.short &&
--
2.23.0