summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorKristoffer Haugsbakk <code@khaugsbakk.name>2024-11-25 21:13:13 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-26 10:05:08 +0900
commit7e2f377b03b0d3593df73a094f97c27b219b02f5 (patch)
treef3181031357fab1042d67e783b3431b9fa53edab /builtin/commit.c
parent515d034f8d922602b9d417cdc02768757aa6f6c1 (diff)
sequencer: comment commit messages properly
The rebase todo editor has commands like `fixup -c` which affects the commit messages of the rebased commits.[1] For example: pick hash1 <msg> fixup hash2 <msg> fixup -c hash3 <msg> This says that hash2 and hash3 should be squashed into hash1 and that hash3’s commit message should be used for the resulting commit. So the user is presented with an editor where the two first commit messages are commented out and the third is not. However this does not work if `core.commentChar`/`core.commentString` is in use since the comment char is hardcoded (#) in this `sequencer.c` function. As a result the first commit message will not be commented out. † 1: See 9e3cebd97cb (rebase -i: add fixup [-C | -c] command, 2021-01-29) Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Co-authored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Reported-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions