diff mbox series

[1/2] log: test --decorate-refs-exclude with --simplify-by-decoration

Message ID ea3fed37-a465-6a26-1035-6885015261b7@web.de (mailing list archive)
State New, archived
Headers show
Series [1/2] log: test --decorate-refs-exclude with --simplify-by-decoration | expand

Commit Message

René Scharfe Sept. 8, 2019, 5:58 p.m. 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(+)

--
2.23.0

Comments

Junio C Hamano Sept. 9, 2019, 6:17 p.m. UTC | #1
René Scharfe <l.s.r@web.de> writes:

> 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(+)

Looks vaguely familiar ;-)  Thanks for resurrecting it.
diff mbox series

Patch

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 &&