]> git.ipfire.org Git - thirdparty/git.git/commit
t5407: add a test demonstrating how interactive handles --skip differently
authorElijah Newren <newren@gmail.com>
Tue, 11 Dec 2018 16:11:34 +0000 (08:11 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Dec 2018 20:49:48 +0000 (12:49 -0800)
commit5400677903bdb852e0ca89e41e009afb8a1b6239
tree44bf20644f96d6270b6bf443202bc19b989cece3
parent72ee67319f703201631b33697291720afd4e1d66
t5407: add a test demonstrating how interactive handles --skip differently

The post-rewrite hook is documented as being invoked by commands that
rewrite commits such as commit --amend and rebase, and that it will
be called for each rewritten commit.

Apparently, the three backends handled --skip'ed commits differently:
  am: treat the skipped commit as though it weren't rewritten
  merge: same as 'am' backend
  interactive: treat skipped commits as having been rewritten to empty
     (view them as an empty fixup to their parent)

For now, just add a testcase documenting the different behavior (use
--keep to force usage of the interactive machinery even though we have
no empty commits).  A subsequent commit will remove the inconsistency in
--skip handling.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5407-post-rewrite-hook.sh