]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
sequencer: use a helper to find the commit message
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 2 Jan 2017 15:26:20 +0000 (16:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2017 22:57:29 +0000 (14:57 -0800)
commit23aa51420cca7bee854f54e970206c00f3be0c86
treebd8a97dffeb93d1d1a9c340f840c2a2a855fefff
parenta70d8f8067640070d89d0764d0dee491f8e0bd13
sequencer: use a helper to find the commit message

It is actually not safe to look for a commit message by looking for the
first empty line and skipping it.

The find_commit_subject() function looks more carefully, so let's use
it. Since we are interested in the entire commit message, we re-compute
the string length after verifying that the commit subject is not empty
(in which case the entire commit message would be empty, something that
should not happen but that we want to handle gracefully).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c