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

Function write_git_state

atomic-cli/src/commands/op/output.rs:418–429  ·  view source on GitHub ↗
(output: &mut String, indent: usize, git: &GitStateDto)

Source from the content-addressed store, hash-verified

416}
417
418fn write_git_state(output: &mut String, indent: usize, git: &GitStateDto) {
419 writeln!(output, "{}head:", spaces(indent)).unwrap();
420 write_git_head(output, indent + 2, &git.head);
421 match &git.index {
422 Some(index) => {
423 writeln!(output, "{}index:", spaces(indent)).unwrap();
424 write_git_index(output, indent + 2, index);
425 }
426 None => write_key_value(output, indent, "index", "none"),
427 }
428 write_key_value(output, indent, "refs_digest", &git.refs_digest);
429}
430
431fn write_git_head(output: &mut String, indent: usize, head: &GitHeadStateDto) {
432 match head {

Callers 1

write_repo_stateFunction · 0.85

Calls 4

write_git_headFunction · 0.85
write_git_indexFunction · 0.85
write_key_valueFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected