Fix git confid for commit

This commit is contained in:
Gregory Schier
2025-03-19 06:59:43 -07:00
parent afd4228fcf
commit 6f8c03d8c1

View File

@@ -117,9 +117,9 @@ pub fn git_commit(dir: &Path, message: &str) -> Result<()> {
let tree = repo.find_tree(tree_oid)?;
// Make the signature
let config = git2::Config::open_default()?.snapshot()?;
let name = config.get_str("user.name").unwrap_or("Change Me");
let email = config.get_str("user.email").unwrap_or("change_me@example.com");
let config = repo.config()?.snapshot()?;
let name = config.get_str("user.name").unwrap_or("Unknown");
let email = config.get_str("user.email")?;
let sig = git2::Signature::now(name, email)?;
// Get the current HEAD commit (if it exists)