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

Function write_git_index

atomic-cli/src/commands/op/output.rs:453–462  ·  view source on GitHub ↗
(output: &mut String, indent: usize, index: &GitIndexStateDto)

Source from the content-addressed store, hash-verified

451}
452
453fn write_git_index(output: &mut String, indent: usize, index: &GitIndexStateDto) {
454 write_key_value(output, indent, "digest", &index.digest);
455 match &index.tree {
456 Some(tree) => {
457 writeln!(output, "{}tree:", spaces(indent)).unwrap();
458 write_git_object(output, indent + 2, tree);
459 }
460 None => write_key_value(output, indent, "tree", "none"),
461 }
462}
463
464fn write_git_object(output: &mut String, indent: usize, object: &GitObjectDto) {
465 write_key_value(output, indent, "algorithm", &object.algorithm);

Callers 2

write_effect_valueFunction · 0.85
write_git_stateFunction · 0.85

Calls 3

write_key_valueFunction · 0.85
write_git_objectFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected