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

[PATCHv11 00/20] git notes

From
Johan Herland <johan@herland.net>
Date
Jan 17, 2010, 21:04 UTC
Message-ID
<1263762277-31419-1-git-send-email-johan@herland.net>
Hi,

Here is the 11th iteration of the git-notes series. Changes in this iteration are as follows:

Changes to existing patches:
- Rebased onto a8b59ef... (Add more testcases to test fast-import of notes)
  which has now been merged to 'next', which now incorporates the initial 3
  of the 11 patches from the previous iteration.
- Patch #1 (was #4) has received minor additional non-functional fixes.
- Patch #4 (was #6) has received two fixes to init_notes():
  - Fail loudly if get_tree_entry() fails on the latest notes commit.
  - Don't ignore the core.notesRef config variable.
- Patch #8 (was #9) revamps for_each_note():
  - Add a 'flags' parameter for adjusting the notes tree traversal.
  - Make sure too-deep fanout levels are consolidated.
  - Minor change to calculation of optimal fanout.
- Patch #10 (was #10) is adjusted to handle the addition of remove_note()
  and write_notes_tree() (patches #6 and #9).
- Patch #11 (was #11) has received some fixes:
  - Use blob_type from blob.h instead of "blob".
New patches:
- Patch #3 adds tests to make sure $GIT_NOTES_REF and core.notesRef
  are handled correctly.
- Patch #6 adds remove_note() for removing notes from notes tree.
- Patch #9 adds write_notes_tree() for saving the notes tree to tree
  objects on disk.
- Patch #12 is the builtin-ification of the "git notes" command.
- Patches #13 and #14 adds tests for aspects of the notes code that was
  not easily testable before the builtin-ification of "git notes".
- Patch #15 teaches the notes code to properly preserve non-note entries
  in the notes tree across a read/update/write-cycle.
- Patches #16 - #18 handles deletion of notes from the notes tree,
  including a test for verifying that repeatedly removing notes
  eventually consolidates the notes tree structure.
- Patches #19 and #20 adds gc_notes() for garbage-collecting notes that
  annotate non-existing commits, and teaches the "--notes" option to
  "git gc".
TODO:
- Handle note objects that are not blobs, but trees
(- Rewrite fast-import notes code to use new notes API with non-note support)
Have fun! :)
...Johan
Johan Herland (20):
  Minor non-functional fixes to notes.c
  Notes API: get_commit_notes() -> format_note() + remove the commit restriction
  Add tests for checking correct handling of $GIT_NOTES_REF and core.notesRef
  Notes API: init_notes(): Initialize the notes tree from the given notes ref
  Notes API: add_note(): Add note objects to the internal notes tree structure
  Notes API: remove_note(): Remove note objects from the notes tree structure
  Notes API: get_note(): Return the note annotating the given object
  Notes API: for_each_note(): Traverse the entire notes tree with a callback
  Notes API: write_notes_tree(): Store the notes tree in the database
  Notes API: Allow multiple concurrent notes trees with new struct notes_tree
  Refactor notes concatenation into a flexible interface for combining notes
  Builtin-ify git-notes
  t3301: Verify successful annotation of non-commits
  t3305: Verify that adding many notes with git-notes triggers increased fanout
  Teach notes code to properly preserve non-notes in the notes tree
  Teach builtin-notes to remove empty notes
  builtin-notes: Teach -d option for deleting existing notes
  t3305: Verify that removing notes triggers automatic fanout consolidation
  Notes API: gc_notes(): Prune notes that belong to non-existing objects
  builtin-gc: Teach the new --notes option to garbage-collect notes
 Documentation/git-gc.txt                      |    5 +-
 Documentation/git-notes.txt                   |   19 +-
 Makefile                                      |    2 +-
 builtin-gc.c                                  |   13 +
 builtin-notes.c                               |  251 ++++++++
 builtin.h                                     |    3 +
 git-notes.sh => contrib/examples/git-notes.sh |    0
 git.c                                         |    1 +
 notes.c                                       |  841 +++++++++++++++++++++----
 notes.h                                       |  192 ++++++-
 pretty.c                                      |    9 +-
 t/t3301-notes.sh                              |  189 +++++-
 t/t3303-notes-subtrees.sh                     |   28 +-
 t/t3304-notes-mixed.sh                        |   36 +-
 t/t3305-notes-fanout.sh                       |   95 +++
 t/t3306-notes-gc.sh                           |  106 ++++
 16 files changed, 1622 insertions(+), 168 deletions(-)
 create mode 100644 builtin-notes.c
 rename git-notes.sh => contrib/examples/git-notes.sh (100%)
 create mode 100755 t/t3305-notes-fanout.sh
 create mode 100755 t/t3306-notes-gc.sh
Next: Johan Herland
Message 1 of 26 in “[PATCHv11 00/20] git notes”
  1. Johan HerlandJan 17, 2010
  2. 01/20 Minor non-functional fixes to notes.cJohan Herland, Jan 17, 2010
  3. 02/20 Notes API: get_commit_notes() -> format_note() + remove the commit restrictionJohan Herland, Jan 17, 2010
  4. 03/20 Add tests for checking correct handling of $GIT_NOTES_REF and core.notesRefJohan Herland, Jan 17, 2010
  5. 04/20 Notes API: init_notes(): Initialize the notes tree from the given notes refJohan Herland, Jan 17, 2010
  6. 05/20 Notes API: add_note(): Add note objects to the internal notes tree structureJohan Herland, Jan 17, 2010
  7. 06/20 Notes API: remove_note(): Remove note objects from the notes tree structureJohan Herland, Jan 17, 2010
  8. 07/20 Notes API: get_note(): Return the note annotating the given objectJohan Herland, Jan 17, 2010
  9. 08/20 Notes API: for_each_note(): Traverse the entire notes tree with a callbackJohan Herland, Jan 17, 2010
  10. 09/20 Notes API: write_notes_tree(): Store the notes tree in the databaseJohan Herland, Jan 17, 2010
  11. 10/20 Notes API: Allow multiple concurrent notes trees with new struct notes_treeJohan Herland, Jan 17, 2010
  12. 11/20 Refactor notes concatenation into a flexible interface for combining notesJohan Herland, Jan 17, 2010
  13. 12/20 Builtin-ify git-notesJohan Herland, Jan 17, 2010
  14. Stephen BoydJan 21, 2010
  15. Johan HerlandJan 26, 2010
  16. 13/20 t3301: Verify successful annotation of non-commitsJohan Herland, Jan 17, 2010
  17. 14/20 t3305: Verify that adding many notes with git-notes triggers increased fanoutJohan Herland, Jan 17, 2010
  18. 15/20 Teach notes code to properly preserve non-notes in the notes treeJohan Herland, Jan 17, 2010
  19. 16/20 Teach builtin-notes to remove empty notesJohan Herland, Jan 17, 2010
  20. 17/20 builtin-notes: Teach -d option for deleting existing notesJohan Herland, Jan 17, 2010
  21. 18/20 t3305: Verify that removing notes triggers automatic fanout consolidationJohan Herland, Jan 17, 2010
  22. 19/20 Notes API: gc_notes(): Prune notes that belong to non-existing objectsJohan Herland, Jan 17, 2010
  23. 20/20 builtin-gc: Teach the new --notes option to garbage-collect notesJohan Herland, Jan 17, 2010
  24. Stephen BoydJan 21, 2010
  25. Junio C HamanoJan 21, 2010
  26. Johan HerlandJan 27, 2010

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.