mirror of
https://github.com/qwjyh/xdbm
synced 2025-02-23 19:47:06 +09:00
debug: add trace log
This commit is contained in:
parent
0fcb2475b4
commit
01965459c6
2 changed files with 13 additions and 0 deletions
1
.github/workflows/rust.yml
vendored
1
.github/workflows/rust.yml
vendored
|
@ -8,6 +8,7 @@ on:
|
|||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_LOG: trace
|
||||
|
||||
jobs:
|
||||
build-and-lint:
|
||||
|
|
12
src/main.rs
12
src/main.rs
|
@ -158,7 +158,19 @@ fn add_and_commit(repo: &Repository, path: &Path, message: &str) -> Result<Oid,
|
|||
let tree = repo.find_tree(oid)?;
|
||||
let config = {
|
||||
let mut config = git2::Config::open_default()?;
|
||||
if log::log_enabled!(log::Level::Trace) {
|
||||
trace!("before reading local config");
|
||||
config
|
||||
.entries(None)?
|
||||
.for_each(|entry| trace!("{:?} = {:?}", entry.name(), entry.value()))?;
|
||||
}
|
||||
config.add_file(&path.join(".git/config"), git2::ConfigLevel::Local, false)?;
|
||||
if log::log_enabled!(log::Level::Trace) {
|
||||
trace!("after reading local config");
|
||||
config
|
||||
.entries(None)?
|
||||
.for_each(|entry| trace!("{:?} = {:?}", entry.name(), entry.value()))?;
|
||||
}
|
||||
config
|
||||
};
|
||||
let signature = git2::Signature::now(
|
||||
|
|
Loading…
Reference in a new issue