History

also inform about the location of the new pack and index files (#450)

Sebastian Thiel committed 4 years ago

Commit d782ff01 parent 6e2a2371 file · +13 −2Browse files

Unified · Split

gitoxide-core/src/repository/fetch.rs+13−2
@@ -59,8 +59,19 @@ pub(crate) mod function { · 58 unmodified lines
5959 Status::NoChange => {
6060 crate::repository::remote::refs::print_refmap(&repo, ref_specs, res.ref_map, &mut out, err)
6161 }
62− Status::Change { update_refs, .. } | Status::DryRun { update_refs } => {
63− print_updates(&repo, update_refs, ref_specs, res.ref_map, &mut out, err)
62+ Status::DryRun { update_refs } => print_updates(&repo, update_refs, ref_specs, res.ref_map, &mut out, err),
63+ Status::Change {
64+ update_refs,
65+ write_pack_bundle,
66+ } => {
67+ print_updates(&repo, update_refs, ref_specs, res.ref_map, &mut out, err)?;
68+ if let Some(data_path) = write_pack_bundle.data_path {
69+ writeln!(out, "pack file: \"{}\"", data_path.display()).ok();
70+ }
71+ if let Some(index_path) = write_pack_bundle.index_path {
72+ writeln!(out, "index file: \"{}\"", index_path.display()).ok();
73+ }
74+ Ok(())
6475 }
6576 }?;
6677 if dry_run {