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

Function record

atomic-repository/src/repository/tests/query_view_tests.rs:385–404  ·  view source on GitHub ↗
(repo: &TestRepository, message: &str)

Source from the content-addressed store, hash-verified

383}
384
385fn record(repo: &TestRepository, message: &str) -> Hash {
386 let author = if message == "sibling_history_marker" {
387 "HiddenSiblingAuthor"
388 } else {
389 "VisibleBaseAuthor"
390 };
391 *repo
392 .record(
393 ChangeHeader::builder()
394 .message(message)
395 .author(Author::new(author, None::<String>))
396 .build(),
397 RecordOptions::new()
398 .with_all(true)
399 .save_to_store(true)
400 .apply_after_record(true),
401 )
402 .unwrap()
403 .hash()
404}
405
406fn fixture() -> (TempDir, TestRepository, Hash) {
407 let (temp, mut repo) = create_temp_repo();

Calls 9

authorMethod · 0.80
apply_after_recordMethod · 0.80
save_to_storeMethod · 0.80
hashMethod · 0.45
unwrapMethod · 0.45
recordMethod · 0.45
buildMethod · 0.45
messageMethod · 0.45
with_allMethod · 0.45

Tested by

no test coverage detected