Remove RepositoryRef type and simply use &Repository.

Signed-off-by: Han Xu <keepsimple@gmail.com>
This commit is contained in:
Han Xu
2022-11-24 11:23:42 +00:00
committed by Fintan Halpenny
parent d3115a2215
commit c44348fc3c
16 changed files with 113 additions and 239 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ use serde::{ser, Serialize, Serializer};
use crate::{
file_system::{Directory, Path},
git::{Error, RepositoryRef},
git::{Error, Repository},
};
pub mod git;
@@ -296,7 +296,7 @@ impl Diff {
// TODO: Direction of comparison is not obvious with this signature.
// For now using conventional approach with the right being "newer".
#[allow(clippy::self_named_constructors)]
pub fn diff(left: Directory, right: Directory, repo: RepositoryRef) -> Result<Self, Error> {
pub fn diff(left: Directory, right: Directory, repo: Repository) -> Result<Self, Error> {
// TODO: Some of the deleted files may actually be moved (renamed) to one of the
// created files. Finding out which of the deleted files were deleted
// and which were moved will probably require performing some variant of