pub struct FilesRefStore { /* private fields */ }Expand description
Loose + packed ref storage on disk.
Implementations§
Source§impl FilesRefStore
impl FilesRefStore
Sourcepub fn open(config: FilesRefStoreConfig) -> Self
pub fn open(config: FilesRefStoreConfig) -> Self
Open a files backend at config.git_dir.
Sourcepub fn from_git_dir(git_dir: impl Into<PathBuf>) -> Result<Self>
pub fn from_git_dir(git_dir: impl Into<PathBuf>) -> Result<Self>
Convenience constructor for a simple repository directory.
Trait Implementations§
Source§impl Debug for FilesRefStore
impl Debug for FilesRefStore
Source§impl RefStore for FilesRefStore
impl RefStore for FilesRefStore
Source§fn format(&self) -> RefStorageFormat
fn format(&self) -> RefStorageFormat
Which on-disk or logical format this store uses. Read more
Source§fn read_raw(&self, name: &str) -> Result<Option<RawRef>>
fn read_raw(&self, name: &str) -> Result<Option<RawRef>>
Read the stored value for
name without resolving symbolic targets. Read moreSource§fn for_each_ref(
&self,
prefix: &str,
f: &mut dyn FnMut(&RefEntry) -> ControlFlow<()>,
) -> Result<()>
fn for_each_ref( &self, prefix: &str, f: &mut dyn FnMut(&RefEntry) -> ControlFlow<()>, ) -> Result<()>
Source§fn prepare(
&self,
txn: RefTransaction,
) -> Result<Box<dyn PreparedRefTransaction + Send + '_>, RefStoreError>
fn prepare( &self, txn: RefTransaction, ) -> Result<Box<dyn PreparedRefTransaction + Send + '_>, RefStoreError>
Validate
txn, take locks, and return a committable batch. Read moreSource§fn for_each_reflog_entry(
&self,
name: &str,
reverse: bool,
f: &mut dyn FnMut(&ReflogEntry) -> ControlFlow<()>,
) -> Result<()>
fn for_each_reflog_entry( &self, name: &str, reverse: bool, f: &mut dyn FnMut(&ReflogEntry) -> ControlFlow<()>, ) -> Result<()>
Source§fn create_reflog(&self, name: &str) -> Result<()>
fn create_reflog(&self, name: &str) -> Result<()>
Create an empty reflog file/record for
name.Source§fn replace_reflog(&self, name: &str, entries: Vec<ReflogEntry>) -> Result<()>
fn replace_reflog(&self, name: &str, entries: Vec<ReflogEntry>) -> Result<()>
Replace the entire reflog (used by expire/delete-entries).
Source§fn for_each_reflog_ref(
&self,
f: &mut dyn FnMut(&str) -> ControlFlow<()>,
) -> Result<()>
fn for_each_reflog_ref( &self, f: &mut dyn FnMut(&str) -> ControlFlow<()>, ) -> Result<()>
Invoke
f for each ref name that has a reflog, in sorted order. Read moreAuto Trait Implementations§
impl !Freeze for FilesRefStore
impl RefUnwindSafe for FilesRefStore
impl Send for FilesRefStore
impl Sync for FilesRefStore
impl Unpin for FilesRefStore
impl UnsafeUnpin for FilesRefStore
impl UnwindSafe for FilesRefStore
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