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

[WIP/RFC 00/13] git notes merge

From
Johan Herland <johan@herland.net>
Date
Jul 23, 2010, 10:14 UTC
Message-ID
<1279880104-29796-1-git-send-email-johan@herland.net>
Hi,

Here are some rough patches implementing most of the 'git notes merge' functionality. There are still missing pieces in the area of manual conflict resolution, but what's here should be enough to start experimenting with automatic notes merge resolution.

Patches #1 - #8 + #10 are a combination of general cleanup and preparations for 'git notes merge'. Patch #9 implements handling of trivial notes merges ("already up-to-date" and "fast-forward"). Patch #11 implements object-level merging of notes, using regular three-way rules. Patch #12 adds a few automatic conflict resolvers that can be used instead of manual conflict resolution (which has yet to be implemented). Patch #13 adds some preliminary docs.

For now, this is probably only ready for those with a special interest in notes.

Have fun! :)
...Johan
Johan Herland (13):
  (trivial) notes.h: Minor documentation fixes to copy_notes()
  notes.h: Make default_notes_ref() available in notes API
  notes.h/c: Clarify the handling of notes objects that are == null_sha1
  notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
  (trivial) t3303: Indent with tabs instead of spaces for consistency
  notes.c: Use two newlines (instead of one) when concatenating notes
  (trivial) git notes prune: Accept --verbose in addition to -v
  builtin/notes.c: Split notes ref DWIMmery into a separate function
  git notes merge: Initial implementation handling trivial merges only
  builtin/notes.c: Refactor creation of notes commits.
  git notes merge: Handle real, non-conflicting notes merges
  git notes merge: Add automatic conflict resolvers (ours, theirs, union)
  Documentation: Preliminary docs on 'git notes merge'
 Documentation/git-notes.txt         |   30 ++-
 Makefile                            |    2 +
 builtin.h                           |    2 +-
 builtin/notes.c                     |  130 ++++++--
 notes-cache.c                       |    3 +-
 notes-merge.c                       |  474 +++++++++++++++++++++++++
 notes-merge.h                       |   59 +++
 notes.c                             |  196 ++++++-----
 notes.h                             |   46 +++-
 t/t3301-notes.sh                    |    4 +
 t/t3303-notes-subtrees.sh           |   19 +-
 t/t3308-notes-merge.sh              |  669 +++++++++++++++++++++++++++++++++++
 t/t3309-notes-merge-auto-resolve.sh |  512 +++++++++++++++++++++++++++
 t/t3404-rebase-interactive.sh       |    1 +
 t/t9301-fast-import-notes.sh        |    5 +
 15 files changed, 2014 insertions(+), 138 deletions(-)
 create mode 100644 notes-merge.c
 create mode 100644 notes-merge.h
 create mode 100755 t/t3308-notes-merge.sh
 create mode 100755 t/t3309-notes-merge-auto-resolve.sh

-- 1.7.2.220.gea1d3

Next: Johan Herland
Message 1 of 24 in “[WIP/RFC 00/13] git notes merge”
  1. Johan HerlandJul 23, 2010
  2. 01/13 (trivial) notes.h: Minor documentation fixes to copy_notes()Johan Herland, Jul 23, 2010
  3. 02/13 notes.h: Make default_notes_ref() available in notes APIJohan Herland, Jul 23, 2010
  4. 03/13 notes.h/c: Clarify the handling of notes objects that are == null_sha1Johan Herland, Jul 23, 2010
  5. 04/13 notes.h/c: Propagate combine_notes_fn return value to add_note() and beyondJohan Herland, Jul 23, 2010
  6. Jonathan NiederJul 23, 2010
  7. Johan HerlandJul 23, 2010
  8. 05/13 (trivial) t3303: Indent with tabs instead of spaces for consistencyJohan Herland, Jul 23, 2010
  9. 06/13 notes.c: Use two newlines (instead of one) when concatenating notesJohan Herland, Jul 23, 2010
  10. 07/13 (trivial) git notes prune: Accept --verbose in addition to -vJohan Herland, Jul 23, 2010
  11. 08/13 builtin/notes.c: Split notes ref DWIMmery into a separate functionJohan Herland, Jul 23, 2010
  12. 09/13 git notes merge: Initial implementation handling trivial merges onlyJohan Herland, Jul 23, 2010
  13. Stephen BoydJul 24, 2010
  14. Johan HerlandJul 25, 2010
  15. 10/13 builtin/notes.c: Refactor creation of notes commits.Johan Herland, Jul 23, 2010
  16. 11/13 git notes merge: Handle real, non-conflicting notes mergesJohan Herland, Jul 23, 2010
  17. 12/13 git notes merge: Add automatic conflict resolvers (ours, theirs, union)Johan Herland, Jul 23, 2010
  18. Stephen BoydJul 24, 2010
  19. Johan HerlandJul 25, 2010
  20. 13/13 Documentation: Preliminary docs on 'git notes merge'Johan Herland, Jul 23, 2010
  21. Stephen BoydJul 24, 2010
  22. Johan HerlandJul 25, 2010
  23. Sam VilainJul 25, 2010
  24. Johan HerlandJul 25, 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.