mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-11-21 18:40:40 +08:00
Remove RepositoryRef type and simply use &Repository.
Signed-off-by: Han Xu <keepsimple@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user