◐ Shell
clean mode source ↗

Add trailer support for commit creation by Krishnachaitanyakc · Pull Request #2116 · gitpython-developers/GitPython

Add a `trailers` parameter to `Commit.create_from_tree()` and
`IndexFile.commit()` that allows appending trailer key-value pairs
(e.g. Signed-off-by, Issue) to the commit message at creation time.

Trailers can be passed as either a dict or a list of (key, value) tuples,
the latter being useful when duplicate keys are needed. The implementation
uses `git interpret-trailers` for proper formatting, consistent with
the existing trailer parsing in `Commit.trailers_list`.

Closes gitpython-developers#1998

@Krishnachaitanyakc