mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
do not run blame on a binary file (earlier out)
This commit is contained in:
parent
e7b703b922
commit
97985bfe62
1 changed files with 3 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ pub fn blame_file(
|
|||
};
|
||||
|
||||
let spec = format!("{}:{}", commit_id.to_string(), file_path);
|
||||
let blame = repo.blame_file(Path::new(file_path), None)?;
|
||||
|
||||
let object = repo.revparse_single(&spec)?;
|
||||
let blob = repo.find_blob(object.id())?;
|
||||
|
||||
|
|
@ -66,6 +66,8 @@ pub fn blame_file(
|
|||
return Err(Error::NoBlameOnBinaryFile);
|
||||
}
|
||||
|
||||
let blame = repo.blame_file(Path::new(file_path), None)?;
|
||||
|
||||
let reader = BufReader::new(blob.content());
|
||||
|
||||
let lines: Vec<(Option<BlameHunk>, String)> = reader
|
||||
|
|
|
|||
Loading…
Reference in a new issue