mirror of
https://github.com/git/git.git
synced 2024-10-28 04:49:43 +01:00
sequencer: delete REBASE_HEAD in correct repo when picking commits
When picking commits, we delete some state before executing the next sequencer action on interactive rebases. But while we use the correct repository to calculate paths to state files that need deletion, we use the repo-less `delete_ref()` function to delete REBASE_HEAD. Thus, if the sequencer ran in a different repository than `the_repository`, we would end up deleting the ref in the wrong repository. Fix this by using `refs_delete_ref()` instead. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
821f6632b0
commit
bb02e95f3b
1 changed files with 2 additions and 1 deletions
|
@ -4767,7 +4767,8 @@ static int pick_commits(struct repository *r,
|
|||
unlink(rebase_path_author_script());
|
||||
unlink(git_path_merge_head(r));
|
||||
unlink(git_path_auto_merge(r));
|
||||
delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
|
||||
refs_delete_ref(get_main_ref_store(r), "", "REBASE_HEAD",
|
||||
NULL, REF_NO_DEREF);
|
||||
|
||||
if (item->command == TODO_BREAK) {
|
||||
if (!opts->verbose)
|
||||
|
|
Loading…
Reference in a new issue