pub struct GitButlerWorkspace {
pub commit: ObjectId,
pub heads: Vec<WorkspaceHead>,
}Expand description
A checked-out GitButler workspace: HEAD is on WORKSPACE_BRANCH and its tip is the
workspace commit (WORKSPACE_COMMIT_MARKER in its message).
Fields§
§commit: ObjectIdThe workspace commit at the tip of WORKSPACE_BRANCH.
heads: Vec<WorkspaceHead>The heads merged into the workspace commit, in its parent order.
Implementations§
Source§impl GitButlerWorkspace
impl GitButlerWorkspace
Sourcepub fn detect(repo: &Repository) -> Result<Option<Self>>
pub fn detect(repo: &Repository) -> Result<Option<Self>>
The workspace repo has checked out, or None when HEAD is not on one.
HEAD must be on WORKSPACE_BRANCH and that branch’s tip must be a commit whose
message contains WORKSPACE_COMMIT_MARKER; a gitbutler/workspace branch with any
other tip is treated as an ordinary branch.
§Errors
Returns ref store and object database errors from reading HEAD, the tip commit or the
local branches.
Sourcepub fn head_commits(&self) -> Vec<ObjectId>
pub fn head_commits(&self) -> Vec<ObjectId>
The merged heads’ commits, in parent order: where history of the applied work starts.
Trait Implementations§
Source§impl Clone for GitButlerWorkspace
impl Clone for GitButlerWorkspace
Source§impl Debug for GitButlerWorkspace
impl Debug for GitButlerWorkspace
impl Eq for GitButlerWorkspace
Source§impl PartialEq for GitButlerWorkspace
impl PartialEq for GitButlerWorkspace
impl StructuralPartialEq for GitButlerWorkspace
Auto Trait Implementations§
impl Freeze for GitButlerWorkspace
impl RefUnwindSafe for GitButlerWorkspace
impl Send for GitButlerWorkspace
impl Sync for GitButlerWorkspace
impl Unpin for GitButlerWorkspace
impl UnsafeUnpin for GitButlerWorkspace
impl UnwindSafe for GitButlerWorkspace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.