mirror of
https://github.com/qwjyh/xdbm
synced 2025-02-23 19:47:06 +09:00
fix(git): git config now gets local config
CI was failing since xdbm init didn't get local git config.
This commit is contained in:
parent
9285f44975
commit
0fcb2475b4
1 changed files with 5 additions and 1 deletions
|
@ -156,7 +156,11 @@ fn add_and_commit(repo: &Repository, path: &Path, message: &str) -> Result<Oid,
|
||||||
index.write()?;
|
index.write()?;
|
||||||
let oid = index.write_tree()?;
|
let oid = index.write_tree()?;
|
||||||
let tree = repo.find_tree(oid)?;
|
let tree = repo.find_tree(oid)?;
|
||||||
let config = git2::Config::open_default()?;
|
let config = {
|
||||||
|
let mut config = git2::Config::open_default()?;
|
||||||
|
config.add_file(&path.join(".git/config"), git2::ConfigLevel::Local, false)?;
|
||||||
|
config
|
||||||
|
};
|
||||||
let signature = git2::Signature::now(
|
let signature = git2::Signature::now(
|
||||||
config.get_entry("user.name")?.value().unwrap(),
|
config.get_entry("user.name")?.value().unwrap(),
|
||||||
config.get_entry("user.email")?.value().unwrap(),
|
config.get_entry("user.email")?.value().unwrap(),
|
||||||
|
|
Loading…
Reference in a new issue