git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
René Scharfe <l.s.r@web.de>
Date
Sep 8, 2019, 17:58 UTC
Message-ID
<ea3fed37-a465-6a26-1035-6885015261b7@web.de>
In-Reply-To
<xmqqwofuia0x.fsf@gitster-ct.c.googlers.com>

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 11 in “Simplify-by-decoration with decorate-refs-exclude”
  1. Étienne SERVAISAug 2, 2019
  2. René ScharfeAug 2, 2019
  3. Junio C HamanoAug 2, 2019
  4. René ScharfeAug 2, 2019
  5. Junio C HamanoAug 2, 2019
  6. Jeff KingAug 2, 2019
  7. René ScharfeAug 3, 2019
  8. Junio C HamanoAug 3, 2019
  9. 1/2 log: test --decorate-refs-exclude with --simplify-by-decorationRené Scharfe, Sep 8, 2019
  10. Junio C HamanoSep 9, 2019
  11. 2/2 log-tree: call load_ref_decorations() in get_name_decoration()René Scharfe, Sep 8, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.