Skip to content

Function: executeGitSnapshotAndResetHook() ​

ts
function executeGitSnapshotAndResetHook(
   _node, 
   input, 
   ctx
): Promise<GitAbortMeta>;

Defined in: git/src/executors/git-hooks-and-checks.ts:110

Executes a GitSnapshotAndResetNode (git.snapshotAndReset()) abort hook on input.handle.

Idempotently snapshots dirty state over baseRef to refs/harness/aborted/<runId>/<stepExecId>, resets the worktree to baseRef, and clears unresolvedConflictPaths.

Parameters ​

ParameterTypeDescription
_nodeGitSnapshotAndResetNodePassive snapshot-and-reset abort hook AST node.
inputAbortHookExecutionInput<GitWorktreeHandle>Abort hook execution input with handle and run/step IDs.
ctxStepExecutionContext<GitWorktreeHandle>Active step execution context.

Returns ​

Promise<GitAbortMeta>

Validated { abortedSnapshotRef, resetToRef } abort metadata receipt.

Released under the MIT License.