Refactor git repository initialization and enhance logging levels

- Updated the `flatten_tree` function in `git.rs` to clarify the repository parameter name.
- Changed logging level from `debug` to `trace` in `finalize_patch_application` for more detailed output.
- Modified the `TestServeSession` initialization to persist git configuration to disk, ensuring user identity is accessible for subsequent operations.

These changes aim to improve code clarity, enhance logging detail, and ensure proper git configuration handling in tests.
This commit is contained in:
Joe 2026-03-01 17:09:35 -06:00
parent f24e991aca
commit a506b97e71
4 changed files with 28 additions and 21 deletions

View file

@ -212,7 +212,7 @@ fn collect_tree_index_changes(
}
fn flatten_tree(
_repo: &gix::Repository,
repo: &gix::Repository,
tree: &gix::Tree<'_>,
prefix: &str,
out: &mut HashMap<String, gix::ObjectId>,

View file

@ -145,7 +145,7 @@ fn finalize_patch_application(context: PatchApplyContext, tree: &mut RojoTree) -
for (id, map) in context.path_refs_to_rewrite {
for (prop_name, path) in map {
if let Some(target) = tree.resolve_ref_path(&path, id) {
log::debug!(
log::trace!(
"Resolved path reference {} -> {} (path: {})",
prop_name,
target,