pub struct BaseResolution {
pub spec: String,
pub reference: Option<String>,
pub commit: String,
pub upstream: Option<Upstream>,
}Expand description
What a review’s --base <spec> resolved to — see Repo::resolve_base.
Serialisable because a report that does not say what it compared against
cannot be checked against the question it was asked. Issue #649’s whole
complaint about review was that its output under-describes its own basis:
the diff was missing, and so was this.
Fields§
§spec: StringThe revspec exactly as it was given on the command line.
Kept beside BaseResolution::reference rather than replaced by it,
because the gap between the two is the defect: main and
refs/heads/main printed together are what let a reader see that they did
not ask for refs/remotes/origin/main.
reference: Option<String>The full name of the ref the spec bound to (refs/heads/main), or None
when the spec named no ref — a raw sha, HEAD~3.
commit: StringThe commit it resolved to, in full hex.
upstream: Option<Upstream>How that commit stands against its upstream, when it has one.
Implementations§
Source§impl BaseResolution
impl BaseResolution
Sourcepub fn short_commit(&self) -> &str
pub fn short_commit(&self) -> &str
The first twelve hex digits of BaseResolution::commit, for a summary
line.
Twelve rather than git’s default seven: seven is chosen for typing, and
this is chosen for comparing — the reader’s next move is
git rev-parse --short main origin/main, whose seven-digit answer is a
prefix of this one, so the comparison still works in the direction it is
actually made.
Trait Implementations§
Source§impl Clone for BaseResolution
impl Clone for BaseResolution
Source§fn clone(&self) -> BaseResolution
fn clone(&self) -> BaseResolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BaseResolution
impl Debug for BaseResolution
impl Eq for BaseResolution
Source§impl PartialEq for BaseResolution
impl PartialEq for BaseResolution
Source§impl Serialize for BaseResolution
impl Serialize for BaseResolution
impl StructuralPartialEq for BaseResolution
Auto Trait Implementations§
impl Freeze for BaseResolution
impl RefUnwindSafe for BaseResolution
impl Send for BaseResolution
impl Sync for BaseResolution
impl Unpin for BaseResolution
impl UnsafeUnpin for BaseResolution
impl UnwindSafe for BaseResolution
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.