summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-15 10:29:27 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-15 10:29:27 -0700
commitd549c188be4f041a117d3ca942a5ac1e5f9fc704 (patch)
treea1541dc6dd58f29fee40fd2bded9212d935b4090
parentRelNotes: minor fixups before 2.51.1 (diff)
parentrebase -i: permit 'drop' of a merge commit (diff)
downloadgit-d549c188be4f041a117d3ca942a5ac1e5f9fc704.tar.gz
git-d549c188be4f041a117d3ca942a5ac1e5f9fc704.zip
Merge branch 'js/rebase-i-allow-drop-on-a-merge' into maint-2.51
During interactive rebase, using 'drop' on a merge commit lead to an error, which was incorrect. * js/rebase-i-allow-drop-on-a-merge: rebase -i: permit 'drop' of a merge commit
-rw-r--r--sequencer.c1
-rwxr-xr-xt/t3404-rebase-interactive.sh1
2 files changed, 2 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index aaf2e4df64..9ae40a91b2 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2721,6 +2721,7 @@ static int check_merge_commit_insn(enum todo_command command)
return error(_("cannot squash merge commit into another commit"));
case TODO_MERGE:
+ case TODO_DROP:
return 0;
default:
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 6bac217ed3..34d6ad0770 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -2263,6 +2263,7 @@ test_expect_success 'non-merge commands reject merge commits' '
edit $oid
fixup $oid
squash $oid
+ drop $oid # acceptable, no advice
EOF
(
set_replace_editor todo &&