Merge branch 'nd/rebase-show-current-patch'
The new "--show-current-patch" option gives an end-user facing way to get the diff being applied when "git rebase" (and "git am") stops with a conflict. * nd/rebase-show-current-patch: rebase: introduce and use pseudo-ref REBASE_HEAD rebase: add --show-current-patch am: add --show-current-patch
This commit is contained in:
@ -2314,6 +2314,9 @@ static int make_patch(struct commit *commit, struct replay_opts *opts)
|
||||
p = short_commit_name(commit);
|
||||
if (write_message(p, strlen(p), rebase_path_stopped_sha(), 1) < 0)
|
||||
return -1;
|
||||
if (update_ref("rebase", "REBASE_HEAD", &commit->object.oid,
|
||||
NULL, REF_NO_DEREF, UPDATE_REFS_MSG_ON_ERR))
|
||||
res |= error(_("could not update %s"), "REBASE_HEAD");
|
||||
|
||||
strbuf_addf(&buf, "%s/patch", get_dir(opts));
|
||||
memset(&log_tree_opt, 0, sizeof(log_tree_opt));
|
||||
@ -2565,6 +2568,7 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
|
||||
unlink(rebase_path_author_script());
|
||||
unlink(rebase_path_stopped_sha());
|
||||
unlink(rebase_path_amend());
|
||||
delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
|
||||
}
|
||||
if (item->command <= TODO_SQUASH) {
|
||||
if (is_rebase_i(opts))
|
||||
|
Reference in New Issue
Block a user