Function: executeGitDiscardBranchHook()
ts
function executeGitDiscardBranchHook(
_node,
input,
ctx
): Promise<void>;Defined in: git/src/executors/git-hooks-and-checks.ts:178
Executes a GitDiscardBranchNode (git.resetWorktree() / git.discardBranch()) rewind hook on input.handle.
Restores input.handle to input.targetStepBaseScopeCheckpoint (or resets to handle.baseRef if absent).
Parameters
| Parameter | Type | Description |
|---|---|---|
_node | GitDiscardBranchNode | Passive discard-branch rewind hook AST node. |
input | RewindHookExecutionInput<GitWorktreeHandle> | Rewind hook execution input. |
ctx | StepExecutionContext<GitWorktreeHandle> | Active step execution context. |
Returns
Promise<void>
Resolves once the worktree is restored to the target step's base checkpoint.