Unified · Split
| @@ -539,6 +539,15 @@ pub mod iter { · 538 unmodified lines | |||
| 539 | } | 539 | } |
| 540 | }) | 540 | }) |
| 541 | } | 541 | } |
| 542 | |||
| 543 | /// The repository-relative path of the entry contained in this item. | ||
| 544 | pub fn rela_path(&self) -> &BStr { | ||
| 545 | match self { | ||
| 546 | Item::Modification { rela_path, .. } => rela_path.as_ref(), | ||
| 547 | Item::DirectoryContents { entry, .. } => entry.rela_path.as_ref(), | ||
| 548 | Item::Rewrite { dirwalk_entry, .. } => dirwalk_entry.rela_path.as_ref(), | ||
| 549 | } | ||
| 550 | } | ||
| 542 | } | 551 | } |
| 543 | 552 | ||
| 544 | impl<'index> From<gix_status::index_as_worktree_with_renames::Entry<'index, (), SubmoduleStatus>> for Item { | 553 | impl<'index> From<gix_status::index_as_worktree_with_renames::Entry<'index, (), SubmoduleStatus>> for Item { |