Make `GitOid` a crate-public type (#10799)

This commit is contained in:
Charlie Marsh 2025-01-20 20:41:35 -05:00 committed by GitHub
parent eabcc94cbc
commit 154fd6bd23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ pub use crate::github::GitHubRepository;
pub use crate::resolver::{
GitResolver, GitResolverError, RepositoryReference, ResolvedRepositoryReference,
};
pub use crate::sha::{GitOid, GitSha, OidParseError};
pub use crate::sha::{GitSha, OidParseError};
pub use crate::source::{Fetch, GitSource, Reporter};
mod credentials;

View File

@ -63,7 +63,7 @@ impl<'de> serde::Deserialize<'de> for GitSha {
///
/// Note this type does not validate whether the input is a valid hash.
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct GitOid {
pub(crate) struct GitOid {
len: usize,
bytes: [u8; 40],
}

View File

@ -14,7 +14,8 @@ use url::Url;
use uv_cache_key::{cache_digest, RepositoryUrl};
use crate::git::GitRemote;
use crate::{GitOid, GitSha, GitUrl, GIT_STORE};
use crate::sha::GitOid;
use crate::{GitSha, GitUrl, GIT_STORE};
/// A remote Git source that can be checked out locally.
pub struct GitSource {