All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCHv10 00/11] git notes
@ 2009-12-07 11:27 Johan Herland
  2009-12-07 11:27 ` [RFC/PATCHv10 01/11] fast-import: Proper notes tree manipulation Johan Herland
                   ` (11 more replies)
  0 siblings, 12 replies; 28+ messages in thread
From: Johan Herland @ 2009-12-07 11:27 UTC (permalink / raw)
  To: git; +Cc: gitster, johan, spearce

Hi,

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

Changes to existing patches:

- Rebased onto 488bdf2... (Fix crasher on encountering SHA1-like non-note
  in notes tree) (There are no conflicts resolved by this, but a test in
  this series crashes without the crash fix in 488bdf2...).

- Yet another rewrite of the fast-import patch. After trying to implement
  Shawn's suggestions, I found that hacking the mode bits of note entries
  could not work, since they are stripped by a mktree()/load_tree()
  round-trip. The new versions treats _all_ entries with note-compatible
  paths (40 hex chars, not including directory separators) as note entries
  (to be subjected to fanout adjustments) in branches where there are note
  activity (one or more 'N' commands).
  Branches without note activity are not touched, of course.

- Otherwise, Shawn's suggestions to the previous iteration have been
  incorporated.

- Extended t9301 tests to verify that non-notes residing in a notes tree
  are not clobbered by the fast-import patch.

- Fix t9301 test #12 to not "cheat" (by 'deleteall' followed by a few
  additions). Instead, remove notes one-by-one to verify correct
  fanout consolidation.

- Minor cleanups here and there


If Shawn is OK with the fast-import patch, I believe that at least
patches #1 - #3 (and possibly #4 - #5) are ready for 'next'.

Patches #6 - #11 drastically extend the notes API. Since there are
currently no users of that API, and it has not been discussed much
on the list (although these patches have already been present in a
few iterations), I would still consider them RFC quality.


TODO:
- Builtin-ify git-notes shell script to take advantage of notes API
- Garbage collect notes whose referenced object is unreachable (gc_notes())
- Handle note objects that are not blobs, but trees


Have fun! :)

...Johan


Johan Herland (11):
  fast-import: Proper notes tree manipulation
  Rename t9301 to t9350, to make room for more fast-import tests
  Add more testcases to test fast-import of notes
  Minor style fixes to notes.c
  Notes API: get_commit_notes() -> format_note() + remove the commit restriction
  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: get_note(): Return the note annotating the given object
  Notes API: for_each_note(): Traverse the entire notes tree with a callback
  Notes API: Allow multiple concurrent notes trees with new struct notes_tree
  Refactor notes concatenation into a flexible interface for combining notes

 fast-import.c                                    |  134 +++++-
 notes.c                                          |  345 +++++++++----
 notes.h                                          |  114 ++++-
 pretty.c                                         |    9 +-
 t/t9300-fast-import.sh                           |  156 +++++-
 t/t9301-fast-import-notes.sh                     |  623 ++++++++++++++++++++++
 t/{t9301-fast-export.sh => t9350-fast-export.sh} |    0
 7 files changed, 1259 insertions(+), 122 deletions(-)
 create mode 100755 t/t9301-fast-import-notes.sh
 rename t/{t9301-fast-export.sh => t9350-fast-export.sh} (100%)

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2009-12-11  3:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 11:27 [RFC/PATCHv10 00/11] git notes Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 01/11] fast-import: Proper notes tree manipulation Johan Herland
2009-12-07 16:41   ` Shawn O. Pearce
2009-12-08  1:44     ` Johan Herland
2009-12-08  2:01       ` Shawn O. Pearce
2009-12-08  2:45         ` Johan Herland
2009-12-10  9:39           ` Johan Herland
2009-12-10 14:03             ` Shawn O. Pearce
2009-12-10 14:40               ` Johan Herland
2009-12-11  3:00                 ` Junio C Hamano
2009-12-07 16:43   ` Shawn O. Pearce
2009-12-08  1:55     ` Johan Herland
2009-12-08  1:59       ` Shawn O. Pearce
2009-12-07 20:42   ` Junio C Hamano
2009-12-08  2:34     ` Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 02/11] Rename t9301 to t9350, to make room for more fast-import tests Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 03/11] Add more testcases to test fast-import of notes Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 04/11] Minor style fixes to notes.c Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 05/11] Notes API: get_commit_notes() -> format_note() + remove the commit restriction Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 06/11] Notes API: init_notes(): Initialize the notes tree from the given notes ref Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 07/11] Notes API: add_note(): Add note objects to the internal notes tree structure Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 08/11] Notes API: get_note(): Return the note annotating the given object Johan Herland
2009-12-07 20:52   ` Junio C Hamano
2009-12-08  3:18     ` Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 09/11] Notes API: for_each_note(): Traverse the entire notes tree with a callback Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 10/11] Notes API: Allow multiple concurrent notes trees with new struct notes_tree Johan Herland
2009-12-07 11:27 ` [RFC/PATCHv10 11/11] Refactor notes concatenation into a flexible interface for combining notes Johan Herland
2009-12-08  9:25 ` [RFC/PATCHv10 00/11] git notes Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.