bisect: fix a regression causing a segfault
[gitweb.git] / sequencer.c
index b8c1e876fa7b57986e6ae93873e23f87c45b9e49..f2a10cc4f24c10adf072eb26ba427f00037b3c79 100644 (file)
@@ -204,7 +204,7 @@ int sequencer_remove_state(struct replay_opts *opts)
                free(opts->xopts[i]);
        free(opts->xopts);
 
-       strbuf_addf(&dir, "%s", get_dir(opts));
+       strbuf_addstr(&dir, get_dir(opts));
        remove_dir_recursively(&dir, 0);
        strbuf_release(&dir);
 
@@ -2558,7 +2558,7 @@ static enum check_level get_missing_commit_check_level(void)
                return CHECK_WARN;
        if (!strcasecmp("error", value))
                return CHECK_ERROR;
-       warning(_("unrecognized setting %s for option"
+       warning(_("unrecognized setting %s for option "
                  "rebase.missingCommitsCheck. Ignoring."), value);
        return CHECK_IGNORE;
 }
@@ -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 write to '%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);