summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-12-10 22:35:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-12-10 22:35:16 (GMT)
commit3e1dbfa135cf131281aa92f159073dc892bac419 (patch)
treef45146f6702e2809f61d75702f15246363502fe7 /sequencer.c
parent7d53ff402a9140663da8e1a7a330f14f0de02e65 (diff)
parentcc9dcdee6142d39cdd42d23b81d2a256f591d289 (diff)
downloadgit-3e1dbfa135cf131281aa92f159073dc892bac419.zip
git-3e1dbfa135cf131281aa92f159073dc892bac419.tar.gz
git-3e1dbfa135cf131281aa92f159073dc892bac419.tar.bz2
Merge branch 'en/rebase-x-fix'
"git rebase -x" added an unnecessary 'exec' instructions before 'noop', which has been corrected. * en/rebase-x-fix: sequencer: avoid adding exec commands for non-commit creating commands
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index b4135a7..795b370 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -5502,7 +5502,7 @@ static void todo_list_add_exec_commands(struct todo_list *todo_list,
}
/* insert or append final <commands> */
- if (insert || nr == todo_list->nr) {
+ if (insert) {
ALLOC_GROW(items, nr + commands->nr, alloc);
COPY_ARRAY(items + nr, base_items, commands->nr);
nr += commands->nr;