#![allow(missing_docs)]
use std::path::Path;
pub use crate::history::patch_id_inject::{
patch_id_compute_call_count as test_patch_id_compute_call_count,
reset_patch_id_compute_call_count as test_reset_patch_id_compute_call_count,
};
pub use crate::refs::inject::{
branch_ref_pause_gate, pause_injection_test_scope, ref_store_batch_pause_gate,
ref_store_batch_pause_test_scope, set_branch_ref_pause_before_commit,
set_ref_store_batch_pause_after_apply, set_reflog_fail, BranchRefPauseGate,
PauseInjectionTestScope, RefStoreBatchPauseGate, RefStoreBatchPauseTestScope,
};
pub use crate::reftable::inject::set_reftable_transaction_fail as set_test_inject_reftable_transaction_fail;
pub use crate::repo::inject::{
set_index_write_fail as set_test_inject_index_write_fail,
set_index_write_fail_remaining as set_test_inject_index_write_fail_remaining,
set_rewrite_apply_abort_after_refs as set_test_inject_rewrite_apply_abort_after_refs,
};
#[must_use]
pub fn new_ref_store_batch_pause_gate() -> RefStoreBatchPauseGate {
ref_store_batch_pause_gate()
}
#[must_use]
pub fn test_pause_injection_serial_guard() -> PauseInjectionTestScope {
pause_injection_test_scope()
}
pub fn set_test_inject_reflog_fail(refname: Option<&str>) {
set_reflog_fail(refname);
}
pub fn set_test_inject_branch_ref_pause_before_commit(gate: Option<BranchRefPauseGate>) {
set_branch_ref_pause_before_commit(gate);
}
pub fn set_test_inject_ref_store_batch_pause_after_apply(
apply_index: usize,
git_dir: &Path,
gate: Option<RefStoreBatchPauseGate>,
) {
set_ref_store_batch_pause_after_apply(apply_index, git_dir, gate);
}