git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 17:00 UTC

[PATCH v3 3/4] t3301: cover generic displayed notes behavior

From
Siddh Raman Pant <siddh.raman.pant@oracle.com>
Date
May 23, 2026, 10:38 UTC
Message-ID
<e494bea038262847ea14d223718f6059e52c1f40.1779532562.git.siddh.raman.pant@oracle.com>
In-Reply-To
<cover.1779532562.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 4 of 12 in “Add support for an external command for fetching notes”
  1. 0/4 Add support for an external command for fetching notesSiddh Raman Pant, May 23, 2026
  2. 2/4 wrapper: add support for timeout and deadline in read helpersSiddh Raman Pant, May 23, 2026
  3. 1/4 notes: convert raw arg in format_display_notes() to boolSiddh Raman Pant, May 23, 2026
  4. 3/4 t3301: cover generic displayed notes behaviorSiddh Raman Pant, May 23, 2026
  5. 4/4 notes: support an external command to display notesSiddh Raman Pant, May 23, 2026
  6. Siddh Raman PantMay 28, 2026
  7. Siddh Raman PantJun 16, 2026
  8. Siddh Raman PantJun 22, 2026
  9. Johannes SixtJun 24, 2026
  10. Siddh Raman PantJun 24, 2026
  11. Siddh Raman PantJul 9, 2026
  12. Siddh Raman PantJul 29, 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.