pub fn messages_in(root: &Path, range: &str) -> Option<Vec<(String, String)>>Expand description
Every commit in range, as a subject and a body, newest first.
The same separators the changelog reads the log with, for the same reason: a commit body may contain any arrangement of newlines, and a field separator git will not produce is the only way to tell where one ends.
use majordomus_cli::commit::plan::messages_in;
// a range git cannot resolve is None, not an empty history
let plain = tempfile::tempdir().expect("a temporary directory");
assert!(messages_in(plain.path(), "HEAD").is_none());