Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C
- From
- Phillip Wood <phillip.wood@talktalk.net>
- Date
- Aug 8, 2018, 16:00 UTC
- Message-ID
- <89a83826-53e6-aea1-2012-475a09f76ddc@talktalk.net>
- In-Reply-To
- <d8f0e5a2-f621-7847-5113-df4a6da11151@gmail.com>
Hi Alban
On 08/08/18 16:16, Alban Gruin wrote:
Show 16 quoted lines
> Hi Phillip,
>
> Le 07/08/2018 à 15:57, Phillip Wood a écrit :
>>> + 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)?
>Ah, I've only made it to patch 10 at the moment! If this is going to be removed don't worry about it.
Best Wishes
Phillip
Show 26 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 >