Struct git_repository::easy::Head
source · [−]pub struct Head<'repo> {
pub kind: Kind,
/* private fields */
}
Expand description
The head reference, as created from looking at .git/HEAD
, able to represent all of its possible states.
Note that like Reference
, this type’s data is snapshot of persisted state on disk.
Fields
kind: Kind
One of various possible states for the HEAD reference
Implementations
Peel this instance to make obtaining its final target id possible, while returning an error on unborn heads.
Follow the symbolic reference of this head until its target object and peel it by following tag objects there is no more object to follow, and return that object id.
Returns None
if the head is unborn.
Returns the full reference name of this head if it is not detached, or None
otherwise.
Returns true if this instance is detached, and points to an object directly.