mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
Use libgit2 to get the merge commit message. (#755)
This commit is contained in:
parent
53f65c8377
commit
a11c0b5eb6
1 changed files with 1 additions and 6 deletions
|
|
@ -1,5 +1,3 @@
|
||||||
use std::fs::read_to_string;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
error::{Error, Result},
|
error::{Error, Result},
|
||||||
sync::{
|
sync::{
|
||||||
|
|
@ -82,10 +80,7 @@ pub fn merge_msg(repo_path: &str) -> Result<String> {
|
||||||
scope_time!("merge_msg");
|
scope_time!("merge_msg");
|
||||||
|
|
||||||
let repo = utils::repo(repo_path)?;
|
let repo = utils::repo(repo_path)?;
|
||||||
|
let content = repo.message()?;
|
||||||
let msg_file = repo.path().join("MERGE_MSG");
|
|
||||||
|
|
||||||
let content = read_to_string(msg_file).unwrap_or_default();
|
|
||||||
|
|
||||||
Ok(content)
|
Ok(content)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue