Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C
- From
Alban Gruin <alban.gruin@gmail.com>
- Date
- Aug 8, 2018, 15:16 UTC
- Message-ID
- <d8f0e5a2-f621-7847-5113-df4a6da11151@gmail.com>
- In-Reply-To
- <d83efc2e-3538-9547-244f-ca7653498c22@talktalk.net>
Hi Phillip,
Le 07/08/2018 à 15:57, Phillip Wood a écrit :
Show 9 quoted lines
>> + if (ret < 0)
>> + error_errno(_("could not append help text to '%s'"), rebase_path_todo());
>> +
>> + fclose(todo);
>
> You should definitely check the return value and return an error if
> appropriate as fputs() might not actually write any data until you try
> and close the file.
> Is this worth a reroll, as this goes away in a later patch (refactored in 08/20, removed in 12/20)?
Show 22 quoted lines
> Best Wishes > > Phillip > >> + strbuf_release(&buf); >> + >> + return ret; >> +} >> diff --git a/rebase-interactive.h b/rebase-interactive.h >> new file mode 100644 >> index 0000000000..47372624e0 >> --- /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 >> >
Cheers, Alban