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

Function describe_notices

atomic-cli/src/commands/status_git.rs:216–270  ·  view source on GitHub ↗
(notices: &[StagingNotice])

Source from the content-addressed store, hash-verified

214}
215
216fn describe_notices(notices: &[StagingNotice]) -> Vec<String> {
217 let mut output = Vec::new();
218 for notice in notices {
219 match notice {
220 StagingNotice::GitOperationInProgress { state } => {
221 output.push(format!("Git operation in progress ({state})"));
222 }
223 StagingNotice::UnmergedIndexEntries { paths } => {
224 output.push(format!(
225 "Git merge conflict: index holds unmerged entries for {}",
226 paths.join(", ")
227 ));
228 }
229 StagingNotice::SparseIndexEntries { paths } => {
230 output.push(format!(
231 "sparse index: {} path(s) covered by unexpanded directory entries, observed via in-memory expansion (sparse absence is not deletion): {}",
232 paths.len(),
233 paths.join(", ")
234 ));
235 }
236 StagingNotice::FlaggedEntries {
237 skip_worktree,
238 assume_unchanged,
239 } => {
240 if !skip_worktree.is_empty() {
241 output.push(format!(
242 "skip-worktree entries exempt from worktree comparison: {}",
243 skip_worktree.join(", ")
244 ));
245 }
246 if !assume_unchanged.is_empty() {
247 output.push(format!(
248 "assume-unchanged entries exempt from worktree comparison: {}",
249 assume_unchanged.join(", ")
250 ));
251 }
252 }
253 StagingNotice::IntentToAdd { paths } => {
254 output.push(format!(
255 "intent-to-add: content not staged for {}",
256 paths.join(", ")
257 ));
258 }
259 StagingNotice::AlternateIndex { path } => {
260 output.push(format!("alternate index observed (GIT_INDEX_FILE): {path}"));
261 }
262 StagingNotice::CommittedConflictSnapshot { head } => {
263 output.push(format!(
264 "committed conflict snapshot at HEAD {head}; Git status is clean by design (markers are ordinary content, not unmerged index state)"
265 ));
266 }
267 }
268 }
269 output
270}
271
272fn collect_shelved_artifacts(repo_root: &Path, view: &str) -> Vec<String> {
273 let dot_dir = repo_root.join(".atomic");

Callers 2

run_git_statusFunction · 0.85
git_status_jsonFunction · 0.85

Calls 2

pushMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected