This adds an error when append_todo_help() fails to write its message to
the todo file.

Signed-off-by: Alban Gruin <[email protected]>
---
 sequencer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sequencer.c b/sequencer.c
index 7cc76332e..7c4bdbb99 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -4380,6 +4380,9 @@ int append_todo_help(unsigned edit_todo, unsigned 
keep_empty)
        }
 
        ret = fputs(buf.buf, todo);
+       if (ret)
+               error_errno(_("Could not append help text to '%s'"), 
rebase_path_todo());
+
        fclose(todo);
        strbuf_release(&buf);
 
-- 
2.18.0

Reply via email to