mononoke: do not move paths in mononoke_admin if a commit was preserved

Summary:
verify-wc didn't work correctly for commits that were preserved i.e. commits
that are the same in small and large repos. For those commits we don't need to
move paths

Reviewed By: farnz

Differential Revision: D18427624

fbshipit-source-id: 102ce743714fe63a3d5ba9e6441fa735361063cb
This commit is contained in:
Stanislau Hlebik 2019-11-11 09:21:45 -08:00 committed by Facebook Github Bot
parent 77f1960967
commit aac4194f7c

View File

@ -155,7 +155,12 @@ async fn subcommand_verify_wc(
.compat()
.await?;
move_all_paths(large_repo_entries, commit_syncer.get_mover())
if large_hash == small_hash {
// No need to move any paths, because this commit was preserved as is
Ok(large_repo_entries)
} else {
move_all_paths(large_repo_entries, commit_syncer.get_mover())
}
};
let small_repo_entries = async {