aboutsummaryrefslogtreecommitdiffstats
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-10-10 10:08:43 -0700
committerJunio C Hamano <gitster@pobox.com>2022-10-10 10:08:43 -0700
commitdc154c39f7303baaf6cad8982a814b28a3a2027a (patch)
treecb8687b0409913480a5242726a5d34200e4820fd /sequencer.c
parent83b2b47850ab68c0bbdf387fe5fa9fd2a48837d8 (diff)
parent3e367a5f2f53f19130b90a97c3e2668eca3461ae (diff)
downloadgit-dc154c39f7303baaf6cad8982a814b28a3a2027a.tar.gz
Merge branch 'ja/rebase-i-avoid-amending-self'
"git rebase -i" can mistakenly attempt to apply a fixup to a commit itself, which has been corrected. * ja/rebase-i-avoid-amending-self: sequencer: avoid dropping fixup commit that targets self via commit-ish
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 d26ede83c4..a4d85f1fbd 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -6203,8 +6203,6 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
return error(_("the script was already rearranged."));
}
- *commit_todo_item_at(&commit_todo, item->commit) = item;
-
parse_commit(item->commit);
commit_buffer = logmsg_reencode(item->commit, NULL, "UTF-8");
find_commit_subject(commit_buffer, &subject);
@@ -6271,6 +6269,8 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
strhash(entry->subject));
hashmap_put(&subject2item, &entry->entry);
}
+
+ *commit_todo_item_at(&commit_todo, item->commit) = item;
}
if (rearranged) {