mirror of
https://github.com/qwjyh/xdbm
synced 2025-02-24 03:57: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:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
RUST_LOG: trace
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-lint:
|
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 tree = repo.find_tree(oid)?;
|
||||||
let config = {
|
let config = {
|
||||||
let mut config = git2::Config::open_default()?;
|
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)?;
|
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
|
config
|
||||||
};
|
};
|
||||||
let signature = git2::Signature::now(
|
let signature = git2::Signature::now(
|
||||||
|
|
Loading…
Reference in a new issue