Skip to content

Commit b623952

Browse files
authored
Merge pull request #4198 from gitbutlerapp/remove-print-tree-function
refactor: Remove unused _print_tree function.
2 parents 1137111 + 8ed3245 commit b623952

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
@@ -2229,27 +2229,6 @@ pub fn write_tree_onto_tree(
22292229
Ok(tree_oid)
22302230
}
22312231

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

0 commit comments

Comments
 (0)