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

[PATCH 6/9] t3301: cover generic displayed notes behavior

From
Siddh Raman Pant <siddh.raman.pant@oracle.com>
Date
May 19, 2026, 16:30 UTC
Message-ID
<70f22e5318ec25acc43fd7818a781391a31e2fd5.1779207350.git.siddh.raman.pant@oracle.com>
In-Reply-To
<cover.1779207350.git.siddh.raman.pant@oracle.com>

Displayed notes already participate in common log behavior. Add explicit coverage for raw notes formatting, --no-notes suppression, explicit notes refs, and --grep matching before teaching external notes to feed the same display path.

Assisted-by: Codex:gpt-5.5-xhigh-fast
Signed-off-by: Siddh Raman Pant <siddh.raman.pant@oracle.com>
---
 t/t3301-notes.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index d6c50460d086..27439010dfbc 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -885,6 +885,30 @@ test_expect_success '--show-notes=ref accumulates' '
 	test_cmp expect-both-reversed actual
 '
 
+test_expect_success 'displayed notes honor raw notes formatting' '
+	git show -s --format=%N >actual &&
+	test_grep "^order test$" actual &&
+	! grep "Notes" actual
+'
+
+test_expect_success 'displayed notes are suppressed by --no-notes' '
+	git log --no-notes -1 >actual &&
+	test_cmp expect-not-other actual
+'
+
+test_expect_success 'explicit notes ref replaces default displayed notes' '
+	git log --notes=other -1 >actual &&
+	test_cmp expect-other actual
+'
+
+test_expect_success 'displayed notes are used for grep matching' '
+	commit=$(git rev-parse HEAD) &&
+	git log --grep="order test" -1 >actual &&
+	test_grep "^commit $commit$" actual &&
+	git log --no-notes --grep="order test" -1 >actual &&
+	test_must_be_empty actual
+'
+
 test_expect_success 'Allow notes on non-commits (trees, blobs, tags)' '
 	test_config core.notesRef refs/notes/other &&
 	echo "Note on a tree" >expect &&
-- 
2.53.0
Previous: Siddh Raman PantNext: Siddh Raman Pant
Message 17 of 29 in “Add support for an external command for fetching notes”
  1. 0/9 Add support for an external command for fetching notesSiddh Raman Pant, May 19, 2026
  2. 1/9 Documentation/git-range-diff: add missing notes options in synopsisSiddh Raman Pant, May 19, 2026
  3. Junio C HamanoMay 19, 2026
  4. Siddh Raman PantMay 20, 2026
  5. Junio C HamanoMay 21, 2026
  6. Siddh Raman PantMay 21, 2026
  7. 4/9 run-command: add support for timeout in command finisherSiddh Raman Pant, May 19, 2026
  8. Johannes SixtMay 21, 2026
  9. Oswald BuddenhagenMay 21, 2026
  10. Siddh Raman PantMay 21, 2026
  11. Johannes SixtMay 21, 2026
  12. Junio C HamanoMay 22, 2026
  13. Siddh Raman PantMay 22, 2026
  14. Jeff KingMay 22, 2026
  15. Siddh Raman PantMay 22, 2026
  16. 5/9 wrapper: add support for timeout and deadline in read helpersSiddh Raman Pant, May 19, 2026
  17. 6/9 t3301: cover generic displayed notes behaviorSiddh Raman Pant, May 19, 2026
  18. 7/9 notes: support an external command to display notesSiddh Raman Pant, May 19, 2026
  19. Junio C HamanoMay 20, 2026
  20. Siddh Raman PantMay 20, 2026
  21. brian m. carlsonMay 21, 2026
  22. Siddh Raman PantMay 21, 2026
  23. brian m. carlsonMay 21, 2026
  24. 2/9 notes: convert raw arg in format_display_notes() to boolSiddh Raman Pant, May 19, 2026
  25. 3/9 wrapper: add sleep_nanosecSiddh Raman Pant, May 19, 2026
  26. Junio C HamanoMay 19, 2026
  27. Siddh Raman PantMay 20, 2026
  28. 8/9 Documentation: document external notes command optionsSiddh Raman Pant, May 19, 2026
  29. 9/9 t: add tests for external notes commandSiddh Raman Pant, May 19, 2026

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.