mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
15cd6d3a25
Check that cherry-pick and rebase call the 'prepare-commit-msg' hook
correctly. The expected values for the hook arguments are taken to
match the current master branch. I think there is scope for improving
the arguments passed so they make a bit more sense - for instance
cherry-pick currently passes different arguments depending on whether
the commit message is being edited. Also the arguments for rebase
could be improved. Commit 7c4188360a
("rebase -i: proper
prepare-commit-msg hook argument when squashing", 2008-10-3) apparently
changed things so that when squashing rebase would pass 'squash' as
the argument to the hook but that has been lost.
I think that it would make more sense to pass 'message' for revert and
cherry-pick -x/-s (i.e. cases where there is a new message or the
current message in modified by the command), 'squash' when squashing
with a new message and 'commit HEAD/CHERRY_PICK_HEAD'
otherwise (picking and squashing without a new message).
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 lines
535 B
Text
17 lines
535 B
Text
message [edit rebase-13]
|
|
message (no editor) [edit rebase-13]
|
|
message [squash rebase-12]
|
|
message (no editor) [squash rebase-11]
|
|
default [edit rebase-10]
|
|
message (no editor) [edit rebase-10]
|
|
message [fixup rebase-9]
|
|
message (no editor) [fixup rebase-8]
|
|
message (no editor) [squash rebase-7]
|
|
message [reword rebase-6]
|
|
message [squash rebase-5]
|
|
message (no editor) [fixup rebase-4]
|
|
message (no editor) [pick rebase-3]
|
|
message (no editor) [fixup rebase-2]
|
|
message (no editor) [fixup rebase-1]
|
|
merge [pick rebase-b]
|
|
message [pick rebase-a]
|