mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
show renamed files correctly in index
This commit is contained in:
parent
2a823f3683
commit
79308db48d
1 changed files with 10 additions and 4 deletions
|
|
@ -67,12 +67,18 @@ impl StatusLists {
|
||||||
|
|
||||||
for e in statuses.iter() {
|
for e in statuses.iter() {
|
||||||
let status: Status = e.status();
|
let status: Status = e.status();
|
||||||
if status.is_ignored() {
|
// if status.is_ignored() {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
let path = if let Some(diff) = e.head_to_index() {
|
||||||
|
String::from(diff.new_file().path().unwrap().to_str().unwrap())
|
||||||
|
} else {
|
||||||
|
e.path().unwrap().to_string()
|
||||||
|
};
|
||||||
|
|
||||||
res.push(StatusItem {
|
res.push(StatusItem {
|
||||||
path: e.path().unwrap().to_string(),
|
path,
|
||||||
status: Some(StatusItemType::from(status)),
|
status: Some(StatusItemType::from(status)),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue