flags |= CLEANUP_MSG;
msg_file = rebase_path_fixup_msg();
} else {
- const char *dest = git_path("SQUASH_MSG");
+ const char *dest = git_path_squash_msg();
unlink(dest);
if (copy_file(dest, rebase_path_squash_msg(), 0666))
return error(_("could not rename '%s' to '%s'"),
rebase_path_squash_msg(), dest);
- unlink(git_path("MERGE_MSG"));
+ unlink(git_path_merge_msg());
msg_file = dest;
flags |= EDIT_MSG;
}
return error(_("could not rename '%s' to '%s'"),
rebase_path_squash_msg(), rebase_path_message());
unlink(rebase_path_fixup_msg());
- unlink(git_path("MERGE_MSG"));
- if (copy_file(git_path("MERGE_MSG"), rebase_path_message(), 0666))
+ unlink(git_path_merge_msg());
+ if (copy_file(git_path_merge_msg(), rebase_path_message(), 0666))
return error(_("could not copy '%s' to '%s'"),
- rebase_path_message(), git_path("MERGE_MSG"));
+ rebase_path_message(), git_path_merge_msg());
return error_with_patch(commit, subject, subject_len, opts, 1, 0);
}
strbuf_trim(&stash_sha1);
child.git_cmd = 1;
+ child.no_stdout = 1;
+ child.no_stderr = 1;
argv_array_push(&child.args, "stash");
argv_array_push(&child.args, "apply");
argv_array_push(&child.args, stash_sha1.buf);
if (!run_command(&child))
- printf(_("Applied autostash."));
+ printf(_("Applied autostash.\n"));
else {
struct child_process store = CHILD_PROCESS_INIT;
res = error(_("could not read orig-head"));
goto cleanup_head_ref;
}
+ strbuf_reset(&buf);
if (!read_oneliner(&buf, rebase_path_onto(), 0)) {
res = error(_("could not read 'onto'"));
goto cleanup_head_ref;
if (has_unstaged_changes(1))
return error(_("cannot rebase: You have unstaged changes."));
if (!has_uncommitted_changes(0)) {
- const char *cherry_pick_head = git_path("CHERRY_PICK_HEAD");
+ const char *cherry_pick_head = git_path_cherry_pick_head();
if (file_exists(cherry_pick_head) && unlink(cherry_pick_head))
return error(_("could not remove CHERRY_PICK_HEAD"));