diff --git a/gix-worktree/src/stack/platform.rs b/gix-worktree/src/stack/platform.rs index 0fcdf90f216..0b270516d24 100644 --- a/gix-worktree/src/stack/platform.rs +++ b/gix-worktree/src/stack/platform.rs @@ -20,6 +20,7 @@ impl<'a> Platform<'a> { /// # Panics /// /// If the cache was configured without exclude patterns. + #[doc(alias = "is_path_ignored", alias = "git2")] pub fn is_excluded(&self) -> bool { self.matching_exclude_pattern() .map_or(false, |m| !m.pattern.is_negative()) diff --git a/gix/src/attribute_stack.rs b/gix/src/attribute_stack.rs index 66497def6ae..e2b9ecc5ce6 100644 --- a/gix/src/attribute_stack.rs +++ b/gix/src/attribute_stack.rs @@ -39,6 +39,7 @@ impl<'repo> AttributeStack<'repo> { /// path is created as directory. If it's not known it is assumed to be a file. /// /// Provide access to cached information for that `relative` path via the returned platform. + #[doc(alias = "is_path_ignored", alias = "git2")] pub fn at_path( &mut self, relative: impl AsRef, diff --git a/gix/src/repository/attributes.rs b/gix/src/repository/attributes.rs index 7f747f7fd98..06bcb569970 100644 --- a/gix/src/repository/attributes.rs +++ b/gix/src/repository/attributes.rs @@ -106,6 +106,7 @@ impl Repository { /// When only excludes are desired, this is the most efficient way to obtain them. Otherwise use /// [`Repository::attributes()`] for accessing both attributes and excludes. // TODO: test + #[doc(alias = "is_path_ignored", alias = "git2")] #[cfg(feature = "excludes")] pub fn excludes( &self, diff --git a/gix/src/repository/index.rs b/gix/src/repository/index.rs index 18899d09fba..9d2ba0ccfb1 100644 --- a/gix/src/repository/index.rs +++ b/gix/src/repository/index.rs @@ -40,6 +40,11 @@ impl crate::Repository { /// Return a shared worktree index which is updated automatically if the in-memory snapshot has become stale as the underlying file /// on disk has changed. /// + /// ### Notes + /// + /// * This will fail if the file doesn't exist, like in a newly initialized repository. If that is the case, use + /// [index_or_empty()](Self::index_or_empty) or [try_index()](Self::try_index) instead. + /// /// The index file is shared across all clones of this repository. pub fn index(&self) -> Result { self.try_index().and_then(|opt| match opt {