Skip to main content

serialize_commit

Function serialize_commit 

Source
pub fn serialize_commit(c: &CommitData) -> Vec<u8> 
Expand description

Serialize a CommitData into the raw bytes suitable for storage.

The caller is responsible for supplying a correctly-formatted author and committer string (including timestamp and timezone).

The message body is written exactly as given: git commit and git commit-tree -m supply a trailing LF; git commit-tree reading from stdin or -F does not add one.