MCPcopy Create free account
hub / github.com/cosmix/loom / create_bootstrap_commit

Function create_bootstrap_commit

loom/src/git/repository.rs:71–89  ·  view source on GitHub ↗
(repo_root: &Path)

Source from the content-addressed store, hash-verified

69
70 let mut result = RepoBootstrapResult::default();
71
72 if !is_git_repository(repo_root, git_config_args)? {
73 let git_dir = repo_root.join(".git");
74 if git_dir.is_dir() {
75 result.removed_stale_git_locks = init_blockers::remove_stale_locks(&git_dir)?;
76 result.backed_up_git_config = init_blockers::back_up_unreadable_config(repo_root)?;
77 }
78 initialize_repo(repo_root, git_config_args)?;
79 result.initialized_repo = true;
80 }
81
82 if !has_head_commit(repo_root, git_config_args) {
83 create_bootstrap_commit(&WorktreeGit::discovered(repo_root), git_config_args)?;
84 result.created_initial_commit = true;
85 }
86
87 Ok(result)
88}
89
90fn configured_args<'a>(git_config_args: &[&'a str], args: &[&'a str]) -> Vec<&'a str> {
91 git_config_args.iter().chain(args.iter()).copied().collect()
92}

Callers 1

Calls 3

ensure_git_identityFunction · 0.85
ensure_bootstrap_readmeFunction · 0.85
run_git_checkedFunction · 0.85

Tested by

no test coverage detected