pub struct SubmoduleConfigCache { /* private fields */ }Expand description
Cache of parsed .gitmodules blobs (by blob OID) plus path/name indexes.
Implementations§
Source§impl SubmoduleConfigCache
impl SubmoduleConfigCache
Sourcepub fn submodule_from_path(
&mut self,
repo: &Repository,
treeish: Option<(ObjectId, ObjectId)>,
path: &str,
) -> Result<Option<SubmoduleInfo>, String>
pub fn submodule_from_path( &mut self, repo: &Repository, treeish: Option<(ObjectId, ObjectId)>, path: &str, ) -> Result<Option<SubmoduleInfo>, String>
Looks up a submodule by checkout path for the given treeish (commit or tree OID).
treeish is None for the worktree / index / HEAD .gitmodules layer (Git null OID).
Sourcepub fn submodule_from_name(
&mut self,
repo: &Repository,
treeish: Option<(ObjectId, ObjectId)>,
name: &str,
) -> Result<Option<SubmoduleInfo>, String>
pub fn submodule_from_name( &mut self, repo: &Repository, treeish: Option<(ObjectId, ObjectId)>, name: &str, ) -> Result<Option<SubmoduleInfo>, String>
Looks up a submodule by its logical .gitmodules name.
Sourcepub fn print_config_from_nested_gitmodules(
_super_repo: &Repository,
super_work_tree: &Path,
submodule_path: &str,
key: &str,
) -> Result<(), String>
pub fn print_config_from_nested_gitmodules( _super_repo: &Repository, super_work_tree: &Path, submodule_path: &str, key: &str, ) -> Result<(), String>
Prints all values for key (canonical submodule config key) from the nested
submodule repository at super_path / submodule_path.
Trait Implementations§
Source§impl Default for SubmoduleConfigCache
impl Default for SubmoduleConfigCache
Source§fn default() -> SubmoduleConfigCache
fn default() -> SubmoduleConfigCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SubmoduleConfigCache
impl RefUnwindSafe for SubmoduleConfigCache
impl Send for SubmoduleConfigCache
impl Sync for SubmoduleConfigCache
impl Unpin for SubmoduleConfigCache
impl UnsafeUnpin for SubmoduleConfigCache
impl UnwindSafe for SubmoduleConfigCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more