debug: add trace log

This commit is contained in:
qwjyh 2025-02-04 05:38:09 +09:00
parent 0fcb2475b4
commit 01965459c6
2 changed files with 13 additions and 0 deletions

View file

@ -8,6 +8,7 @@ on:
env:
CARGO_TERM_COLOR: always
RUST_LOG: trace
jobs:
build-and-lint:

View file

@ -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(