git-commit: fix for trailer handling

If a Commit was constructed with trailers, they would not be added to
the buffer for committing.

Fix this by parsing the message by inspecting each line for a
potential trailer, if there is one then store it for later, otherwise
keep it as part of the message. This means that a message stays intact
even if a trailer that is expected to parse did not.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
Fintan Halpenny
2022-11-04 14:45:10 +00:00
parent fefe20343f
commit ae4e7bce59
2 changed files with 33 additions and 20 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "git-commit"
version = "0.1.0"
version = "0.2.0"
license = "MIT OR Apache-2.0"
edition = "2021"
authors = [