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

[PATCH] sequencer.c: unify error messages

From
Ralf Thielow <ralf.thielow@gmail.com>
Date
Oct 13, 2017, 17:51 UTC
Message-ID
<20171013175157.13634-1-ralf.thielow@gmail.com>

When ftruncate() in rearrange_squash() fails, we write that we couldn't finish the operation on the todo file. It is more accurate to write that we couldn't truncate as we do in other calls of ftruncate().

While at there, remove a full stop in another error message.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
 sequencer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index e258bb646..b0e6459a5 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2948,9 +2948,9 @@ int rearrange_squash(void)
 		if (fd < 0)
 			res = error_errno(_("could not open '%s'"), todo_file);
 		else if (write(fd, buf.buf, buf.len) < 0)
-			res = error_errno(_("could not read '%s'."), todo_file);
+			res = error_errno(_("could not read '%s'"), todo_file);
 		else if (ftruncate(fd, buf.len) < 0)
-			res = error_errno(_("could not finish '%s'"),
+			res = error_errno(_("could not truncate '%s'"),
 					   todo_file);
 		close(fd);
 		strbuf_release(&buf);
-- 
2.15.0.rc0.296.g7b26d72
Next: René Scharfe
Message 1 of 9 in “sequencer.c: unify error messages”
  1. sequencer.c: unify error messagesRalf Thielow, Oct 13, 2017
  2. René ScharfeOct 13, 2017
  3. Ralf ThielowOct 15, 2017
  4. Johannes SchindelinOct 15, 2017
  5. sequencer.c: fix and unify error messages in rearrange_squash()Ralf Thielow, Oct 15, 2017
  6. Junio C HamanoOct 16, 2017
  7. Johannes SchindelinOct 16, 2017
  8. Philip OakleyOct 16, 2017
  9. Junio C HamanoOct 16, 2017

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.