mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-26 12:35:14 +03:00
show renamed files correctly in index
This commit is contained in:
parent
2a823f3683
commit
79308db48d
@ -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 New Issue
Block a user