pub struct CleanContext<'a> {Show 20 fields
pub root: &'a Path,
pub start_files: HashMap<String, Value>,
pub all_run_ids: Vec<String>,
pub refs: HashMap<String, RefEntry>,
pub refs_loaded: bool,
pub wip_branch_tips: HashMap<String, String>,
pub default_branch: String,
pub origin_default: Option<String>,
pub default_tree: Option<String>,
pub origin_default_tree: Option<String>,
pub wip_contains_cache: HashMap<String, Vec<String>>,
pub merged_cache: HashMap<String, Option<RemovalReason>>,
pub branch_contains_calls: usize,
pub cherry_pick_set: Option<HashSet<String>>,
pub rev_list_cache: HashMap<String, Vec<String>>,
pub ancestor_cache: HashMap<(String, String), bool>,
pub contains_target: HashSet<(String, String)>,
pub merge_base_cache: HashMap<(String, String), Option<String>>,
pub cherry_cache: HashMap<(String, String), bool>,
pub merge_tree_cache: HashMap<(String, String), bool>,
}Expand description
Context for cleaning a repository, caching metadata to avoid redundant git calls and disk reads.
Fields§
§root: &'a Path§start_files: HashMap<String, Value>§all_run_ids: Vec<String>§refs: HashMap<String, RefEntry>§refs_loaded: bool§wip_branch_tips: HashMap<String, String>§default_branch: String§origin_default: Option<String>§default_tree: Option<String>§origin_default_tree: Option<String>§wip_contains_cache: HashMap<String, Vec<String>>§merged_cache: HashMap<String, Option<RemovalReason>>§branch_contains_calls: usize§cherry_pick_set: Option<HashSet<String>>§rev_list_cache: HashMap<String, Vec<String>>§ancestor_cache: HashMap<(String, String), bool>§contains_target: HashSet<(String, String)>§merge_base_cache: HashMap<(String, String), Option<String>>§cherry_cache: HashMap<(String, String), bool>§merge_tree_cache: HashMap<(String, String), bool>Implementations§
Source§impl<'a> CleanContext<'a>
impl<'a> CleanContext<'a>
pub fn new(root: &'a Path) -> Self
pub fn remove_branch(&mut self, branch_name: &str)
pub fn tree_sha(&self, ref_name: &str) -> Option<String>
pub fn get_cherry_pick_set(&mut self) -> &HashSet<String>
pub fn get_branch_tip(&self, branch_name: &str) -> Option<String>
pub fn is_research_run(&self, id: &str) -> bool
pub fn get_wip_branches_containing(&mut self, tip_sha: &str) -> Vec<String>
pub fn get_children_of(&mut self, id: &str, tip_sha: &str) -> Vec<String>
pub fn is_child_run_merged( &mut self, child: &str, visited: &mut HashSet<String>, ) -> Result<bool, String>
pub fn check_run_merged( &mut self, id: &str, ) -> Result<Option<RemovalReason>, String>
pub fn is_commit_merged_with_targets( &mut self, commit_sha: &str, extra_targets: &[&str], ) -> bool
pub fn is_commit_merged(&mut self, commit_sha: &str) -> bool
pub fn is_branch_merged_with_targets( &mut self, branch_name: &str, extra_targets: &[&str], ) -> bool
pub fn is_branch_merged_checked( &mut self, branch_name: &str, ) -> Result<bool, String>
pub fn is_branch_merged(&mut self, branch_name: &str) -> bool
pub fn find_merged_followup( &mut self, id: &str, ) -> Result<Option<String>, String>
pub fn check_removable( &mut self, id: &str, older_than_days: u64, ) -> Result<RemovalReason, KeptReason>
Auto Trait Implementations§
impl<'a> Forget for CleanContext<'a>
impl<'a> Freeze for CleanContext<'a>where
&'a Path: Freeze,
*const u8 is !null: Freeze,
PhantomData<(String, Value)>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, RefEntry)>: Freeze,
PhantomData<(String, String)>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(String, Vec<String>)>: Freeze,
PhantomData<(String, Option<RemovalReason>)>: Freeze,
PhantomData<(String, ())>: Freeze,
PhantomData<((String, String), bool)>: Freeze,
PhantomData<((String, String), ())>: Freeze,
PhantomData<((String, String), Option<String>)>: Freeze,
impl<'a> Move for CleanContext<'a>
impl<'a> RefUnwindSafe for CleanContext<'a>
impl<'a> Send for CleanContext<'a>where
&'a Path: Send,
RawTable<(String, Value)>: Send,
RawVecInner: Send,
RawTable<(String, RefEntry)>: Send,
RawTable<(String, String)>: Send,
RawTable<(String, Vec<String>)>: Send,
RawTable<(String, Option<RemovalReason>)>: Send,
RawTable<(String, ())>: Send,
RawTable<((String, String), bool)>: Send,
RawTable<((String, String), ())>: Send,
RawTable<((String, String), Option<String>)>: Send,
impl<'a> Sync for CleanContext<'a>where
RawTable<(String, Value)>: Sync,
RawVecInner: Sync,
RawTable<(String, RefEntry)>: Sync,
RawTable<(String, String)>: Sync,
RawTable<(String, Vec<String>)>: Sync,
RawTable<(String, Option<RemovalReason>)>: Sync,
RawTable<(String, ())>: Sync,
RawTable<((String, String), bool)>: Sync,
RawTable<((String, String), ())>: Sync,
RawTable<((String, String), Option<String>)>: Sync,
impl<'a> Unpin for CleanContext<'a>
impl<'a> UnsafeUnpin for CleanContext<'a>where
&'a Path: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, RefEntry)>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, Vec<String>)>: UnsafeUnpin,
PhantomData<(String, Option<RemovalReason>)>: UnsafeUnpin,
PhantomData<(String, ())>: UnsafeUnpin,
PhantomData<((String, String), bool)>: UnsafeUnpin,
PhantomData<((String, String), ())>: UnsafeUnpin,
PhantomData<((String, String), Option<String>)>: UnsafeUnpin,
impl<'a> UnwindSafe for CleanContext<'a>where
&'a Path: UnwindSafe,
HashMap<String, Value>: UnwindSafe,
RawVecInner: UnwindSafe,
HashMap<String, RefEntry>: UnwindSafe,
HashMap<String, String>: UnwindSafe,
HashMap<String, Vec<String>>: UnwindSafe,
HashMap<String, Option<RemovalReason>>: UnwindSafe,
NonNull<u8>: UnwindSafe,
HashMap<(String, String), bool>: UnwindSafe,
HashMap<(String, String), Option<String>>: UnwindSafe,
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