pub struct GitClone {
pub id: ActionId,
pub repo_url: String,
pub path: PathBuf,
pub deps: Vec<ActionId>,
}Expand description
Action that mirrors a remote git repository into a local working tree.
On first execution, performs git clone <url> <path>. On subsequent
executions, performs git -C <path> fetch origin followed by
git -C <path> reset --hard FETCH_HEAD. The output_hash is the
SHA-256 of the freshly-checked-out HEAD commit’s SHA-1.
Fields§
§id: ActionIdAction identifier for the plan.
repo_url: StringRemote git URL to clone from.
path: PathBufLocal destination path.
deps: Vec<ActionId>IDs of actions that must complete before this one runs.
Trait Implementations§
Source§impl Action for GitClone
impl Action for GitClone
Source§fn output_present<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 Ctx,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn output_present<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 Ctx,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The checkout must still be a git worktree on this machine. Catches a hand-deleted directory, and the shared-cache case where another machine recorded the clone.
Source§fn input_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Ctx,
) -> Pin<Box<dyn Future<Output = Result<Sha256, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn input_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Ctx,
) -> Pin<Box<dyn Future<Output = Result<Sha256, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Computes the hash representing the input state of this action.
This is used for caching and determining if the action needs to run.
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Ctx,
) -> Pin<Box<dyn Future<Output = Result<BuildOutput, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Ctx,
) -> Pin<Box<dyn Future<Output = Result<BuildOutput, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes the action’s core logic.
Source§fn is_coordinator(&self) -> bool
fn is_coordinator(&self) -> bool
true for actions that only coordinate other actions (federation’s
RepolithSync) rather than doing bounded work themselves. Read moreAuto Trait Implementations§
impl Freeze for GitClone
impl RefUnwindSafe for GitClone
impl Send for GitClone
impl Sync for GitClone
impl Unpin for GitClone
impl UnsafeUnpin for GitClone
impl UnwindSafe for GitClone
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