diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2019-12-06 16:06:09 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-06 09:32:01 -0800 |
commit | 21b11c6d1de3840dcaf3fa82dae14ca3924f689f (patch) | |
tree | e64d350048a385453c8f208dd31de2df6150a593 /compat | |
parent | cherry-pick: check commit error messages (diff) | |
download | tgif-21b11c6d1de3840dcaf3fa82dae14ca3924f689f.tar.xz |
sequencer: write CHERRY_PICK_HEAD for reword and edit
`git commit` relies on the presence of CHERRY_PICK_HEAD to show the
correct error message in the case of an empty pick. This fixes a
regression introduced by the conversion from shell to C. In the shell
version everything was a cherry-pick as far as the sequencer code was
concerned so it always wrote CHERRY_PICK_HEAD. The conversion to C
forgot to update the code that creates CHERRY_PICK_HEAD. We do not want
to create CHERRY_PICK_HEAD for fixup and squash commands as that would
prevent `git commit --amend` from running.
Note that the error message shown by `git commit` for an empty pick
during a rebase is currently wrong as it talks about running `git
cherry-pick --skip` rather than `git rebase --skip`. This will be fixed
in a future commit which is why the tests are in t3403-rebase-skip.sh.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
0 files changed, 0 insertions, 0 deletions