Re: [WIP/RFC 04/13] notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 23, 2010, 15:23 UTC
- Message-ID
- <20100723152344.GA1709@burratino>
- In-Reply-To
- <1279880104-29796-5-git-send-email-johan@herland.net>
Hi,
Johan Herland wrote:
Show 8 quoted lines
> --- 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