Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Thielow <ralf.thielow@gmail.com>2017-10-15 20:07:42 +0300
committerJunio C Hamano <gitster@pobox.com>2017-10-16 04:53:03 +0300
commit3247edbb1a8218f9c65f09a25d46572b224d096b (patch)
treebfc6bf3df561d90857f40e7baaf9abbee3bfcc63 /sequencer.c
parentdfab1eac2362dfcac7c96a43c3938d8ec67d7722 (diff)
sequencer.c: fix and unify error messages in rearrange_squash()
When the write opertion fails, we write that we could not read. Change the error message to match the operation and remove the full stop at the end. When ftruncate() 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(). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c
index b7e0a3864c..961a222506 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2926,9 +2926,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 write '%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);