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

Method short_code

atomic-repository/src/status.rs:234–246  ·  view source on GitHub ↗

Get a short code for this status (for display). Returns a single character commonly used in VCS status displays: - ` ` (space) for Clean - `M` for Modified - `D` for Deleted - `?` for Untracked - `A` for Added - `U` for PendingUntrack - `C` for Conflicted - `T` for TypeChanged - `P` for PermissionsChanged

(&self)

Source from the content-addressed store, hash-verified

232 /// - `T` for TypeChanged
233 /// - `P` for PermissionsChanged
234 pub fn short_code(&self) -> char {
235 match self {
236 FileStatus::Clean => ' ',
237 FileStatus::Modified => 'M',
238 FileStatus::Deleted => 'D',
239 FileStatus::Untracked => '?',
240 FileStatus::Added => 'A',
241 FileStatus::PendingUntrack => 'U',
242 FileStatus::Conflicted => 'C',
243 FileStatus::TypeChanged => 'T',
244 FileStatus::PermissionsChanged => 'P',
245 }
246 }
247
248 /// Get a human-readable description of this status.
249 pub fn description(&self) -> &'static str {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected