Subject: Re: [WIP/RFC 04/13] notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond

From: Jonathan Nieder <[email-masked]>
Date: Fri, 23 Jul 2010 10:23:44 -0500

Hi,

Johan Herland wrote:

> --- a/builtin/notes.c
> +++ b/builtin/notes.c
> @@ -574,6 +574,7 @@ static int add(int argc, const char **argv, const char *prefix)
>  	if (is_null_sha1(new_note))
>  		remove_note(t, object);
>  	else
> +		/* No return value checking; c_n_overwrite always returns 0 */
>  		add_note(t, object, new_note, combine_notes_overwrite);

I suspect something like

	if (add_note(t, object, ...))
		die("confused: combine_notes_overwrite failed");

would be less likely to fall out of date. ;-)

This whole series is good stuff.  I look forward to trying it
out.

Thanks,
Jonathan