pub struct GitBackend { /* private fields */ }Implementations§
Source§impl GitBackend
impl GitBackend
pub fn init_internal(store_path: &Path) -> Self
pub fn init_external(store_path: &Path, git_repo_path: &Path) -> Self
pub fn load(store_path: &Path) -> Self
Trait Implementations§
Source§impl Backend for GitBackend
impl Backend for GitBackend
Source§fn name(&self) -> &str
fn name(&self) -> &str
A unique name that identifies this backend. Written to
.jj/repo/store/backend when the repo is created.Source§fn commit_id_length(&self) -> usize
fn commit_id_length(&self) -> usize
The length of commit IDs in bytes.
Source§fn change_id_length(&self) -> usize
fn change_id_length(&self) -> usize
The length of change IDs in bytes.
fn git_repo(&self) -> Option<Repository>
fn read_file( &self, _path: &RepoPath, id: &FileId, ) -> BackendResult<Box<dyn Read>>
fn write_file( &self, _path: &RepoPath, contents: &mut dyn Read, ) -> BackendResult<FileId>
fn read_symlink( &self, _path: &RepoPath, id: &SymlinkId, ) -> Result<String, BackendError>
fn write_symlink( &self, _path: &RepoPath, target: &str, ) -> Result<SymlinkId, BackendError>
fn root_commit_id(&self) -> &CommitId
fn root_change_id(&self) -> &ChangeId
fn empty_tree_id(&self) -> &TreeId
fn read_tree(&self, _path: &RepoPath, id: &TreeId) -> BackendResult<Tree>
fn write_tree(&self, _path: &RepoPath, contents: &Tree) -> BackendResult<TreeId>
fn read_conflict( &self, _path: &RepoPath, id: &ConflictId, ) -> BackendResult<Conflict>
fn write_conflict( &self, _path: &RepoPath, conflict: &Conflict, ) -> BackendResult<ConflictId>
fn read_commit(&self, id: &CommitId) -> BackendResult<Commit>
fn write_commit(&self, contents: &Commit) -> BackendResult<CommitId>
Auto Trait Implementations§
impl !Freeze for GitBackend
impl RefUnwindSafe for GitBackend
impl Send for GitBackend
impl Sync for GitBackend
impl Unpin for GitBackend
impl UnsafeUnpin for GitBackend
impl UnwindSafe for GitBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more