MCPcopy Create free account
hub / github.com/dashed/git-chain / create_first_commit

Function create_first_commit

tests/common/mod.rs:140–148  ·  view source on GitHub ↗
(repo: &Repository, root_tree_oid: Oid, message: &str)

Source from the content-addressed store, hash-verified

138}
139
140pub fn create_first_commit(repo: &Repository, root_tree_oid: Oid, message: &str) {
141 let tree = repo.find_tree(root_tree_oid).unwrap();
142
143 let author = &repo.signature().unwrap();
144 let committer = &author;
145
146 repo.commit(Some("HEAD"), author, committer, message, &tree, &[])
147 .unwrap();
148}
149
150pub fn create_commit(repo: &Repository, root_tree_oid: Oid, message: &str) {
151 let tree = repo.find_tree(root_tree_oid).unwrap();

Callers 1

first_commit_allFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected