git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[GSoC][PATCH 1/1] sequencer: print an error message if append_todo_help() fails

From
Alban Gruin <alban.gruin@gmail.com>
Date
Jun 26, 2018, 10:04 UTC
Message-ID
<20180626100429.10169-2-alban.gruin@gmail.com>
In-Reply-To
<20180626100429.10169-1-alban.gruin@gmail.com>

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

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
---
 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
Previous: Alban GruinNext: Johannes Schindelin
Message 2 of 5 in “sequencer: print an error message if append_todo_help() fails”
  1. Alban GruinJun 26, 2018
  2. [GSoC][PATCH 1/1] sequencer: print an error message if append_todo_help() failsAlban Gruin, Jun 26, 2018
  3. Johannes SchindelinJun 26, 2018
  4. Junio C HamanoJun 26, 2018
  5. Johannes SchindelinJun 26, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.