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

Function is_recordable

atomic-cli/src/commands/status.rs:1374–1384  ·  view source on GitHub ↗

Check if a file status represents a recordable change. Recordable statuses are changes that can be included in a `record` operation. Clean, untracked, and conflicted files are not directly recordable.

(status: FileStatus)

Source from the content-addressed store, hash-verified

1372/// Recordable statuses are changes that can be included in a `record` operation.
1373/// Clean, untracked, and conflicted files are not directly recordable.
1374pub fn is_recordable(status: FileStatus) -> bool {
1375 matches!(
1376 status,
1377 FileStatus::Modified
1378 | FileStatus::Added
1379 | FileStatus::Deleted
1380 | FileStatus::PendingUntrack
1381 | FileStatus::TypeChanged
1382 | FileStatus::PermissionsChanged
1383 )
1384}
1385
1386// Tests
1387

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected