aboutsummaryrefslogtreecommitdiffstats
path: root/git-rebase--merge.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2018-12-11 08:11:35 -0800
committerJunio C Hamano <gitster@pobox.com>2018-12-28 12:49:48 -0800
commit45339f74ef87123ab79831310bf8047cebe5177b (patch)
tree14111c37d5934fd02e6e7556a3c4269038dc6f33 /git-rebase--merge.sh
parentt5407: add a test demonstrating how interactive handles --skip differently (diff)
downloadgit-45339f74ef87123ab79831310bf8047cebe5177b.tar.gz
git-45339f74ef87123ab79831310bf8047cebe5177b.zip
am, rebase--merge: do not overlook --skip'ed commits with post-rewrite
The post-rewrite hook is supposed to be invoked for each rewritten commit. The fact that a commit was selected and processed by the rebase operation (even though when we hit an error a user said it had no more useful changes), suggests we should write an entry for it. In particular, let's treat it as an empty commit trivially squashed into its parent. This brings the rebase--am and rebase--merge backends in sync with the behavior of the interactive rebase backend. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--merge.sh')
-rw-r--r--git-rebase--merge.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
index aa2f2f0872..91250cbaed 100644
--- a/git-rebase--merge.sh
+++ b/git-rebase--merge.sh
@@ -121,6 +121,8 @@ continue)
skip)
read_state
git rerere clear
+ cmt="$(cat "$state_dir/cmt.$msgnum")"
+ echo "$cmt $(git rev-parse HEAD^0)" >> "$state_dir/rewritten"
msgnum=$(($msgnum + 1))
while test "$msgnum" -le "$end"
do