We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 34eb0c9 + 1dc4568 commit 2856434Copy full SHA for 2856434
gix/src/status/index_worktree.rs
@@ -539,6 +539,15 @@ pub mod iter {
539
}
540
})
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
551
552
553
impl<'index> From<gix_status::index_as_worktree_with_renames::Entry<'index, (), SubmoduleStatus>> for Item {
0 commit comments