git cherry-pick -x: link in details instead of in summary -
given commit message "foo", i.e. summary part, git cherry-pick -x the_commit
. result new commit message
foothat's not good, because two-line summary, seems bug in git.
(cherry picked commit eb42a6475d2c2e4fff7a1b626ce6e27eec21e886)
but how can make git make comment below without editing comment manually?
foo
(cherry picked commit eb42a6475d2c2e4fff7a1b626ce6e27eec21e886)
you're right seems oversight. send email git mailing list , see think! you'll have handle yourself, though.
the way deal avoid altogether: make original commit message good. if it's multi-line, blank line in there, appended line cherry-pick not screw format.
to work around it, given cherry-picked commit has one-line message, say, can use -e
option cherry-pick. if you're using vim, worst case have hit ggo<esc>zz
take care of it.
or write prepare-commit-msg hook. should need in is:
#!/bin/bash sed -i '2s/^(cherry picked/\n&' "$1"
Comments
Post a Comment