pub struct PushedTree { /* private fields */ }Expand description
A checkout of the pushed commit, removed when it goes out of scope.
Implementations§
Source§impl PushedTree
impl PushedTree
Sourcepub fn create(repo: &Path, tip: &str) -> Option<PushedTree>
pub fn create(repo: &Path, tip: &str) -> Option<PushedTree>
Materialise tip, or None when that is not possible — in which case
the caller falls back to the working tree and says so.
Takes the repository explicitly rather than relying on the working
directory: set_current_dir is process-global, so a test that changed
it would race every other test in the binary.
pub fn path(&self) -> &Path
Trait Implementations§
Source§impl Drop for PushedTree
impl Drop for PushedTree
Auto Trait Implementations§
impl Freeze for PushedTree
impl RefUnwindSafe for PushedTree
impl Send for PushedTree
impl Sync for PushedTree
impl Unpin for PushedTree
impl UnsafeUnpin for PushedTree
impl UnwindSafe for PushedTree
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