Use libgit2 to get the merge commit message. (#755)

This commit is contained in:
Kieran Siek 2021-06-01 23:29:24 +08:00 committed by GitHub
parent 53f65c8377
commit a11c0b5eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,3 @@
use std::fs::read_to_string;
use crate::{
error::{Error, Result},
sync::{
@ -82,10 +80,7 @@ pub fn merge_msg(repo_path: &str) -> Result<String> {
scope_time!("merge_msg");
let repo = utils::repo(repo_path)?;
let msg_file = repo.path().join("MERGE_MSG");
let content = read_to_string(msg_file).unwrap_or_default();
let content = repo.message()?;
Ok(content)
}