Skip to content

Commit 8ed3245

Browse files
committed
refactor: Remove unused _print_tree function.
1 parent f16afa6 commit 8ed3245

File tree

1 file changed

+0
-21
lines changed
  • crates/gitbutler-core/src/virtual_branches

1 file changed

+0
-21
lines changed

crates/gitbutler-core/src/virtual_branches/virtual.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,27 +2228,6 @@ pub fn write_tree_onto_tree(
22282228
Ok(tree_oid)
22292229
}
22302230

2231-
fn _print_tree(repo: &git2::Repository, tree: &git2::Tree) -> Result<()> {
2232-
println!("tree id: {}", tree.id());
2233-
for entry in tree {
2234-
println!(
2235-
" entry: {} {}",
2236-
entry.name().unwrap_or_default(),
2237-
entry.id()
2238-
);
2239-
// get entry contents
2240-
let object = entry.to_object(repo).context("failed to get object")?;
2241-
let blob = object.as_blob().context("failed to get blob")?;
2242-
// convert content to string
2243-
if let Ok(content) = std::str::from_utf8(blob.content()) {
2244-
println!(" blob: {}", content);
2245-
} else {
2246-
println!(" blob: BINARY");
2247-
}
2248-
}
2249-
Ok(())
2250-
}
2251-
22522231
#[allow(clippy::too_many_arguments)]
22532232
pub fn commit(
22542233
project_repository: &project_repository::Repository,

0 commit comments

Comments
 (0)