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

Function git_status_rows

atomic-cli/tests/it/status_git_cb11a_test.rs:220–237  ·  view source on GitHub ↗

The two-column lines of `atomic status --git` (dropping Note/heading lines).

(fixture: &Fixture)

Source from the content-addressed store, hash-verified

218
219/// The two-column lines of `atomic status --git` (dropping Note/heading lines).
220fn git_status_rows(fixture: &Fixture) -> Vec<String> {
221 String::from_utf8_lossy(&fixture.atomic_ok(&["status", "--git"]).stdout)
222 .lines()
223 .filter(|line| {
224 line.len() >= 3
225 && line.as_bytes()[2] == b' '
226 && matches!(
227 line.as_bytes()[0],
228 b' ' | b'M' | b'A' | b'D' | b'T' | b'U' | b'R' | b'C' | b'?'
229 )
230 && matches!(
231 line.as_bytes()[1],
232 b' ' | b'M' | b'A' | b'D' | b'T' | b'U' | b'R' | b'C' | b'?'
233 )
234 })
235 .map(ToString::to_string)
236 .collect()
237}
238
239/// The short-format lines of native `atomic status -s`.
240fn native_rows(fixture: &Fixture) -> Vec<String> {

Callers

nothing calls this directly

Calls 5

collectMethod · 0.45
linesMethod · 0.45
atomic_okMethod · 0.45
lenMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected