Thread (35 messages) flat view 35 messages, 3 authors, 2016-06-15

Re: [PATCHv4 05/21] notes.h/c: Clarify the handling of notes objects that are == null_sha1

From: Johan Herland <hidden>
Date: 2016-06-15 22:49:50

On Thursday 21 October 2010, Jonathan Nieder wrote:
Johan Herland wrote:
quoted
Clearly specify how combine_notes functions are expected to handle
null_sha1 in input. Also specify (and implement) that returning
null_sha1 from a combine_notes function will cause the note in
question to be removed.
Ack again on patches 1-4.  As for this one, I still think the log
message does not make the goal obvious.

[...]
Ok, I liked your alternative message much better. The next iteration 
will have this commit message:

  notes.h/c: Allow combine_notes functions to remove notes

  Allow combine_notes functions to request that a note be removed,
  by setting the resulting note SHA1 to null_sha1 (0000000...).

  For consistency, also teach note_tree_insert() to skip insertion
  of an empty note when there is no note to combine it with.

  In general, an empty note is treated identically to no note at
  all, but when adding an empty note where there already exists a
  non-empty note, we allow the combine_notes function to potentially
  record a new/changed note. Document this behaviour, and clearly
  specify how combine_notes functions are expected to handle null_sha1
  in input.


Thanks again, for your superhuman patience in reviewing.

...Johan

-- 
Johan Herland, [off-list ref]
www.herland.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help