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

Re: [RFC PATCH] show decorations at the end of the line

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 14, 2017, 22:11 UTC
Message-ID
<xmqqr330779h.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqq7f4tdcua.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
> Thanks.  We'd need to update the tests that expects the old style
> output, though.

The updates to the expectation look like this (already squashed). The --source decorations in 4202 are also shown at the end, which probably is in line with the way --show-decorations adds them at the end of the line, but was somewhat surprising from reading only the log message.

diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 48b55bfd27..dea2d449ab 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -1353,9 +1353,9 @@ test_expect_success 'set up --source tests' '
 
 test_expect_success 'log --source paints branch names' '
 	cat >expect <<-\EOF &&
-	09e12a9	source-b three
-	8e393e1	source-a two
-	1ac6c77	source-b one
+	09e12a9 three	source-b
+	8e393e1 two	source-a
+	1ac6c77 one	source-b
 	EOF
 	git log --oneline --source source-a source-b >actual &&
 	test_cmp expect actual
@@ -1364,9 +1364,9 @@ test_expect_success 'log --source paints branch names' '
 test_expect_success 'log --source paints tag names' '
 	git tag -m tagged source-tag &&
 	cat >expect <<-\EOF &&
-	09e12a9	source-tag three
-	8e393e1	source-a two
-	1ac6c77	source-tag one
+	09e12a9 three	source-tag
+	8e393e1 two	source-a
+	1ac6c77 one	source-tag
 	EOF
 	git log --oneline --source source-tag source-a >actual &&
 	test_cmp expect actual
diff --git a/t/t4207-log-decoration-colors.sh b/t/t4207-log-decoration-colors.sh
index b972296f06..08236a83e7 100755
--- a/t/t4207-log-decoration-colors.sh
+++ b/t/t4207-log-decoration-colors.sh
@@ -44,15 +44,15 @@ test_expect_success setup '
 '
 
 cat >expected <<EOF
-${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD ->\
+${c_commit}COMMIT_ID${c_reset} B${c_commit} (${c_reset}${c_HEAD}HEAD ->\
  ${c_reset}${c_branch}master${c_reset}${c_commit},\
  ${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\
- ${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B
-${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit},\
- ${c_reset}${c_remoteBranch}other/master${c_reset}${c_commit})${c_reset} A1
-${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset}\
- On master: Changes to A.t
-${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset} A
+ ${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset}
+${c_commit}COMMIT_ID${c_reset} A1${c_commit} (${c_reset}${c_tag}tag: A1${c_reset}${c_commit},\
+ ${c_reset}${c_remoteBranch}other/master${c_reset}${c_commit})${c_reset}
+${c_commit}COMMIT_ID${c_reset} On master: Changes to A.t\
+${c_commit} (${c_reset}${c_stash}refs/stash${c_reset}${c_commit})${c_reset}
+${c_commit}COMMIT_ID${c_reset} A${c_commit} (${c_reset}${c_tag}tag: A${c_reset}${c_commit})${c_reset}
 EOF
 
 # We want log to show all, but the second parent to refs/stash is irrelevant
Previous: Jeff KingNext: Jeff King
Message 7 of 20 in “show decorations at the end of the line”
  1. show decorations at the end of the lineLinus Torvalds, Feb 11, 2017
  2. Linus TorvaldsFeb 11, 2017
  3. Junio C HamanoFeb 13, 2017
  4. Linus TorvaldsFeb 13, 2017
  5. Junio C HamanoFeb 13, 2017
  6. Jeff KingFeb 13, 2017
  7. Junio C HamanoFeb 14, 2017
  8. Jeff KingFeb 15, 2017
  9. Junio C HamanoFeb 18, 2017
  10. Linus TorvaldsFeb 19, 2017
  11. Jacob KellerFeb 19, 2017
  12. Jeff KingFeb 20, 2017
  13. Junio C HamanoFeb 20, 2017
  14. Linus TorvaldsFeb 20, 2017
  15. Junio C HamanoFeb 21, 2017
  16. Linus TorvaldsFeb 21, 2017
  17. Jeff KingFeb 21, 2017
  18. Junio C HamanoFeb 21, 2017
  19. Jeff KingFeb 21, 2017
  20. Stephan BeyerFeb 14, 2017

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.