MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / projection_failpoint

Function projection_failpoint

atomic-cli/src/commands/git/shadow.rs:1782–1794  ·  view source on GitHub ↗

Deterministic projection crash points (opt-in instrumentation, CB-8B ac-3): compiled only with the `adoption-test-injection` feature. Each named environment variable turns the phase boundary into a typed failure so recovery can be exercised before and after every journaled effect. Shipping builds compile the no-op stub: no environment value can alter projection behavior.

(name: &str)

Source from the content-addressed store, hash-verified

1780/// Shipping builds compile the no-op stub: no environment value can alter
1781/// projection behavior.
1782fn projection_failpoint(name: &str) -> CliResult<()> {
1783 #[cfg(feature = "adoption-test-injection")]
1784 {
1785 if std::env::var_os(name).is_some() {
1786 return Err(git_error(format!("debug failpoint: {name}")));
1787 }
1788 }
1789 #[cfg(not(feature = "adoption-test-injection"))]
1790 {
1791 let _ = name;
1792 }
1793 Ok(())
1794}
1795
1796fn align_index_to_tree(
1797 git_repo: &GitRepository,

Callers 1

Calls 1

git_errorFunction · 0.70

Tested by

no test coverage detected