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
+3 -3
View File
@@ -29,7 +29,7 @@ use serde::{
use crate::{
commit,
file_system,
git::RepositoryRef,
git::Repository,
object::{Error, Info, ObjectType},
revision::Revision,
};
@@ -115,7 +115,7 @@ impl Serialize for BlobContent {
/// Will return [`Error`] if the project doesn't exist or a surf interaction
/// fails.
pub fn blob(
repo: &RepositoryRef,
repo: &Repository,
maybe_revision: Option<Revision>,
path: &str,
) -> Result<Blob, Error> {
@@ -123,7 +123,7 @@ pub fn blob(
}
fn make_blob<C>(
repo: &RepositoryRef,
repo: &Repository,
maybe_revision: Option<Revision>,
path: &str,
content: C,
+2 -2
View File
@@ -30,7 +30,7 @@ use serde::{
use crate::{
commit,
file_system::{self, DirectoryEntry},
git::RepositoryRef,
git::Repository,
object::{Error, Info, ObjectType},
revision::Revision,
};
@@ -87,7 +87,7 @@ impl Serialize for TreeEntry {
///
/// Will return [`Error`] if any of the surf interactions fail.
pub fn tree(
repo: &RepositoryRef,
repo: &Repository,
maybe_revision: Option<Revision>,
maybe_prefix: Option<String>,
) -> Result<Tree, Error> {