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

Method fmt

atomic-repository/src/repository/snapshot_split.rs:121–165  ·  view source on GitHub ↗
(&self, formatter: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

119
120impl std::fmt::Display for SnapshotSplitRefusal {
121 fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
122 match self {
123 Self::UnsupportedVersion { found } => write!(
124 formatter,
125 "unsupported index manifest version {found}; expected {INDEX_MANIFEST_VERSION}"
126 ),
127 Self::EmptySelection => write!(formatter, "index manifest selects no changes"),
128 Self::InvalidPath { path } => write!(formatter, "unsafe index path '{path}'"),
129 Self::DuplicatePath { path } => write!(formatter, "duplicate index path '{path}'"),
130 Self::DuplicateRenameSource { path } => {
131 write!(
132 formatter,
133 "rename source '{path}' is selected more than once"
134 )
135 }
136 Self::MissingRenameSource { path } => {
137 write!(
138 formatter,
139 "rename source '{path}' does not exist in the baseline"
140 )
141 }
142 Self::RenameTargetExists { path } => {
143 write!(
144 formatter,
145 "rename target '{path}' already exists in the baseline"
146 )
147 }
148 Self::FilterRoundTrip { path } => write!(
149 formatter,
150 "repository bytes for '{path}' do not survive the configured smudge/clean boundary"
151 ),
152 Self::UnsupportedUnit { path, reason } => {
153 write!(formatter, "cannot safely separate '{path}': {reason}")
154 }
155 Self::SnapshotChanged { snapshot } => write!(
156 formatter,
157 "working copy no longer matches snapshot {}",
158 snapshot.to_base32()
159 ),
160 Self::EmptyRemainder => write!(
161 formatter,
162 "index selection consumes the complete snapshot; use snapshot promotion"
163 ),
164 }
165 }
166}
167
168#[derive(Debug, Error)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected