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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]