pub enum CloneHead {
Branch(String),
Detached {
tag: String,
oid: ObjectId,
},
}Expand description
Initial checkout disposition after clone (before working-tree checkout).
Variants§
Branch(String)
Checked out on a local branch that tracks the remote.
Detached
Detached at a tag’s peeled commit (git clone -b <tag>).
Implementations§
Source§impl CloneHead
impl CloneHead
Sourcepub fn branch_name(&self) -> Option<&str>
pub fn branch_name(&self) -> Option<&str>
Local branch name when CloneHead::Branch; None when detached.
Sourcepub fn tag_name(&self) -> Option<&str>
pub fn tag_name(&self) -> Option<&str>
Tag name when detached at a tag; None on a branch checkout.
Sourcepub fn is_detached(&self) -> bool
pub fn is_detached(&self) -> bool
Whether HEAD is detached (tag checkout).
Trait Implementations§
impl Eq for CloneHead
impl StructuralPartialEq for CloneHead
Auto Trait Implementations§
impl Freeze for CloneHead
impl RefUnwindSafe for CloneHead
impl Send for CloneHead
impl Sync for CloneHead
impl Unpin for CloneHead
impl UnsafeUnpin for CloneHead
impl UnwindSafe for CloneHead
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.