commands

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Amend added in v1.1.1

func Amend(args []string) error

Amend wraps git commit --amend and auto-syncs child branches

func Commit added in v1.1.1

func Commit(args []string) error

Commit wraps git commit and auto-syncs child branches

func Config

func Config(args []string) error

Config handles configuration commands

func Delete

func Delete(args []string) error

Delete deletes a branch and its worktree, or an entire stack by hash

func Diff added in v1.5.0

func Diff(args []string) error

func Down added in v1.1.1

func Down(args []string) error

Down navigates to a child branch in the stack

func EmitCd added in v1.1.1

func EmitCd(path string)

EmitCd outputs a cd command to stdout if running through the shell wrapper, otherwise prints a message to stderr telling the user to cd manually.

func Goto

func Goto(args []string) error

Goto navigates to a branch worktree

func IsDescendantOf

func IsDescendantOf(mgr *stack.Manager, branchName, ancestorName string) bool

IsDescendantOf checks if branchName is a descendant of ancestorName Exported for reuse by stack command

func IsShellWrapped added in v1.1.1

func IsShellWrapped() bool

IsShellWrapped returns true if ezs is running through the shell wrapper function. When true, stdout "cd <path>" will be eval'd by the shell. When false, the tool should print the path to stderr and tell the user to cd manually.

func List

func List(args []string) error

List lists all stacks and branches

func NavigateToBranch(g *git.Git, branchName, worktreePath string) error

NavigateToBranch navigates to a branch by cd-ing to its worktree or checking out the branch.

func New

func New(args []string) error

New creates a new branch in the stack

func OfferForcePush added in v0.1.1

func OfferForcePush(branchName, worktreePath string) bool

OfferForcePush prompts the user to force push a branch with --force-with-lease Returns true if push was successful, false otherwise

func OfferForcePushMultiple added in v0.1.1

func OfferForcePushMultiple(branches []string, getBranchWorktree func(string) string) int

OfferForcePushMultiple prompts the user to force push multiple branches Returns the number of successfully pushed branches

func OfferPush added in v1.7.0

func OfferPush(branchName, worktreePath string) bool

OfferPush prompts the user to push a branch (regular push, not force). Used after merge operations where history is not rewritten. Returns true if push was successful or not needed, false if declined.

func OfferPushMultiple added in v1.7.0

func OfferPushMultiple(branches []string, getBranchWorktree func(string) string) int

OfferPushMultiple prompts the user to push multiple branches (regular push, not force). Used after merge operations where history is not rewritten. Returns the number of successfully pushed branches.

func PR

func PR(args []string) error

PR handles pull request operations

func Push added in v1.5.0

func Push(args []string) error

func Reparent

func Reparent(args []string) error

Reparent changes the parent of a branch

func SelectNewParent

func SelectNewParent(mgr *stack.Manager, g *git.Git, branchName, baseBranch string) (string, error)

SelectNewParent shows a selection UI for choosing the new parent Exported for reuse by stack command

func ShellQuote added in v1.5.0

func ShellQuote(s string) string

ShellQuote returns a single-quoted shell string, escaping any embedded single quotes.

func Stack

func Stack(args []string) error

Stack adds a branch to a stack (alias for reparent with standalone branch)

func Status

func Status(args []string) error

Status shows the status of current stack or all stacks with PR and CI info

func Sync

func Sync(args []string) error

Sync syncs the stack with remote - handles merged parents and branches behind origin/main

func Unstack

func Unstack(args []string) error

Unstack removes a branch from ezstack tracking without deleting the git branch

func Up added in v1.1.1

func Up(args []string) error

Up navigates to the parent branch in the stack

func ValidateWorktreeBaseDir

func ValidateWorktreeBaseDir(worktreeBaseDir, repoDir string) error

ValidateWorktreeBaseDir validates that the worktree base directory is not inside the repo. Returns an error if the path is invalid, nil if valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL