Skip to content

Commit

Permalink
feat: add State::remove_(tree|resolve_undo)() to remove possibly ou…
Browse files Browse the repository at this point in the history
…tdated extensions.
  • Loading branch information
Byron committed Feb 13, 2025
1 parent 8173096 commit 668cb12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gix-index/src/access/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,10 @@ impl State {
pub fn tree(&self) -> Option<&extension::Tree> {
self.tree.as_ref()
}
/// Remove the `tree` extension.
pub fn remove_tree(&mut self) -> Option<extension::Tree> {
self.tree.take()
}
/// Access the `link` extension.
pub fn link(&self) -> Option<&extension::Link> {
self.link.as_ref()
Expand All @@ -561,6 +565,10 @@ impl State {
pub fn resolve_undo(&self) -> Option<&extension::resolve_undo::Paths> {
self.resolve_undo.as_ref()
}
/// Remove the resolve-undo extension.
pub fn remove_resolve_undo(&mut self) -> Option<extension::resolve_undo::Paths> {
self.resolve_undo.take()
}
/// Obtain the untracked extension.
pub fn untracked(&self) -> Option<&extension::UntrackedCache> {
self.untracked.as_ref()
Expand Down

0 comments on commit 668cb12

Please sign in to comment.