Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Jul 10, 2024
1 parent 534baa3 commit cc751b4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions file-tree-merge/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@ fn main() -> Result<()> {
println!("{}", "Dry-run mode enabled, it will not touch create, modify ot delete any files, will just print the changes!".yellow().bold());
}

println!("{}", "Build changes trees...".cyan());
println!("{}", "Building changes trees...".cyan());
let (changes_tree1, errors1) =
changes_tree(PathWalker::new(&args.path1), &args.repo.join("1"))?;
let (changes_tree2, errors2) =
changes_tree(PathWalker::new(&args.path2), &args.repo.join("2"))?;

println!("{}", "Merge changes trees...".cyan());
println!("{}", "Merging changes trees...".cyan());
change_tree_merge::merge(changes_tree1, changes_tree2, MergeStrategy::OneWay)?.pipe(|x| {
if x.0 .0.is_empty() && x.1 .0.is_empty() {
println!("{}", "No changes to apply".green());
println!("{}", "No changes".green());
return Ok::<(), anyhow::Error>(());
}
if !args.dry_run {
println!("{}", "Apply changes...".cyan());
println!("{}", "Applying changes...".cyan());
}
println!("{}", "src -> dst...".cyan());
let (changes_src, items_path1) = x.0;
Expand All @@ -119,7 +119,7 @@ fn main() -> Result<()> {
args.checksum,
!args.no_crc,
)?;
println!("{}", "Cleanup repo...".cyan());
println!("{}", "Cleaning up repo...".cyan());
git_delete_history(&args.repo.join("1"))?;
// todo: dst -> src
git_add(&args.repo.join("1"), ".")?;
Expand Down

0 comments on commit cc751b4

Please sign in to comment.