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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jonathan Nieder
Date: Wednesday, October 20, 2010 - 10:12 pm

Johan Herland wrote:


Ack again on patches 1-4.  As for this one, I still think the log message
does not make the goal obvious.

 1. Clearly specify how combine_notes functions are expected to
    handle null_sha1 in input.

Wasn't it already clear?  I guess you mean that the documentation was
updated.  But surely that is less important than:

 2. Also specify (and implement) that returning null_sha1 from a
    combine_notes function will ...

A person reading this for the first time could be forgiven for thinking
this is like (1), i.e., documenting an edge case.  But actually it's
the main point, and the part I omitted with "..." is the important
part!

Why not say something like:

	Allow combine_notes functions to request that a note be
	removed, by returning the object id of the empty blob.

	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: for example, when merging two notes trees,
	one of which does not have a certain note, combine_notes()
	will be called as though that tree had an empty note
	instead.  Document this.

The above includes guesses, so please do not use it verbatim
unless it's true. :)

Of course these are minor nitpicks as compared to the content of
the patch itself.  The patch still looks good.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv4 00/21] git notes merge, Johan Herland, (Wed Oct 20, 7:08 pm)
Re: [PATCHv4 05/21] notes.h/c: Clarify the handling of not ..., Jonathan Nieder, (Wed Oct 20, 10:12 pm)
Re: [PATCHv4 06/21] notes.h/c: Propagate combine_notes_fn ..., Jonathan Nieder, (Wed Oct 20, 10:21 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Thu Oct 21, 2:00 pm)
Re: [PATCHv4 00/21] git notes merge, Junio C Hamano, (Thu Oct 21, 4:20 pm)
Re: [PATCHv4 00/21] git notes merge, Jonathan Nieder, (Thu Oct 21, 4:30 pm)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 8:41 am)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 8:54 am)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 3:28 pm)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 5:47 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 6:38 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 6:44 pm)