Re: [GSoC][PATCH v2 2/7] rebase--interactive: rewrite append_todo_help() in C
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 3, 2018, 20:29 UTC
- Message-ID
- <xmqqlgasoyfd.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180702105717.26386-3-alban.gruin@gmail.com>
Alban Gruin <alban.gruin@gmail.com> writes:
> + ret = fputs(buf.buf, todo);
> + if (ret < 0)
> + error_errno(_("Could not append help text to '%s'"), rebase_path_todo());Error checking fputs() return is an improvement from the version that has been queued on 'pu'. I think messages given to error() and friends begin with lowercase uncapitalized by convention, though.
Show 17 quoted lines
> + fclose(todo); > + strbuf_release(&buf); > + > + return ret; > +} > diff --git a/rebase-interactive.h b/rebase-interactive.h > new file mode 100644 > index 000000000..47372624e > --- /dev/null > +++ b/rebase-interactive.h > @@ -0,0 +1,6 @@ > +#ifndef REBASE_INTERACTIVE_H > +#define REBASE_INTERACTIVE_H > + > +int append_todo_help(unsigned edit_todo, unsigned keep_empty); > + > +#endif