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

Function create_test_repo

atomic-repository/tests/state_based_diff_test.rs:42–49  ·  view source on GitHub ↗

Create a test repository with a single recorded file.

()

Source from the content-addressed store, hash-verified

40
41/// Create a test repository with a single recorded file.
42fn create_test_repo() -> (Repository, TempDir, PathBuf) {
43 let temp = TempDir::new().expect("Failed to create temp dir");
44 let repo_path = temp.path().to_path_buf();
45
46 let repo = Repository::init(&repo_path).expect("Failed to init repository");
47
48 (repo, temp, repo_path)
49}
50
51/// Helper to create a file in the repository and add it.
52fn create_and_add_file(repo: &Repository, repo_path: &Path, name: &str, content: &str) {

Callers 15

test_content_at_sequenceFunction · 0.70
test_untracked_fileFunction · 0.70
test_empty_fileFunction · 0.70
test_binary_contentFunction · 0.70
test_large_fileFunction · 0.70
test_large_file_stressFunction · 0.70
test_unicode_contentFunction · 0.70

Calls 1

pathMethod · 0.45

Tested by

no test coverage detected