Struct branchless::core::rewrite::RebasePlanBuilder
source · pub struct RebasePlanBuilder<'a> { /* private fields */ }
Expand description
Builder for a rebase plan. Unlike regular Git rebases, a git-branchless
rebase plan can move multiple unrelated subtrees to unrelated destinations.
Implementations§
source§impl<'a> RebasePlanBuilder<'a>
impl<'a> RebasePlanBuilder<'a>
sourcepub fn new(dag: &'a Dag, permissions: RebasePlanPermissions) -> Self
pub fn new(dag: &'a Dag, permissions: RebasePlanPermissions) -> Self
Constructor.
sourcepub fn move_subtree(
&mut self,
source_oid: NonZeroOid,
dest_oids: Vec<NonZeroOid>
) -> Result<()>
pub fn move_subtree( &mut self, source_oid: NonZeroOid, dest_oids: Vec<NonZeroOid> ) -> Result<()>
Generate a sequence of rebase steps that cause the subtree at source_oid
to be rebased on top of dest_oids
.
sourcepub fn move_commit(
&mut self,
source_oid: NonZeroOid,
dest_oid: NonZeroOid
) -> Result<()>
pub fn move_commit( &mut self, source_oid: NonZeroOid, dest_oid: NonZeroOid ) -> Result<()>
Generate a sequence of rebase steps that cause the commit at
source_oid
to be rebased on top of dest_oid
, and for the descendants
of source_oid
to be rebased on top of its parent.
sourcepub fn move_range(
&mut self,
source_oid: NonZeroOid,
end_oid: NonZeroOid,
dest_oid: NonZeroOid
) -> Result<()>
pub fn move_range( &mut self, source_oid: NonZeroOid, end_oid: NonZeroOid, dest_oid: NonZeroOid ) -> Result<()>
Generate a sequence of rebase steps that cause the range from
source_oid
to end_oid
to be rebased on top of dest_oid
, and for
the descendants of end_oid
to be rebased on top of the parent of
source_oid
.
sourcepub fn replace_commit(
&mut self,
original_oid: NonZeroOid,
replacement_oid: NonZeroOid
) -> Result<()>
pub fn replace_commit( &mut self, original_oid: NonZeroOid, replacement_oid: NonZeroOid ) -> Result<()>
Instruct the rebase planner to replace the commit at original_oid
with the commit at
replacement_oid
.
sourcepub fn build(
&self,
effects: &Effects,
pool: &ThreadPool,
repo_pool: &ResourcePool<RepoResource>
) -> Result<Result<Option<RebasePlan>, BuildRebasePlanError>>
pub fn build( &self, effects: &Effects, pool: &ThreadPool, repo_pool: &ResourcePool<RepoResource> ) -> Result<Result<Option<RebasePlan>, BuildRebasePlanError>>
Create the rebase plan. Returns None
if there were no commands in the rebase plan.
Trait Implementations§
source§impl<'a> Clone for RebasePlanBuilder<'a>
impl<'a> Clone for RebasePlanBuilder<'a>
source§fn clone(&self) -> RebasePlanBuilder<'a>
fn clone(&self) -> RebasePlanBuilder<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'a> !RefUnwindSafe for RebasePlanBuilder<'a>
impl<'a> Send for RebasePlanBuilder<'a>
impl<'a> Sync for RebasePlanBuilder<'a>
impl<'a> Unpin for RebasePlanBuilder<'a>
impl<'a> !UnwindSafe for RebasePlanBuilder<'a>
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more