Describes which incomplete git operation is in progress.
Presence of the corresponding marker file/directory under .git/ is definitive —
git creates these for the duration of the operation and removes them on commit or abort.
Authoritative list of remote ticket branch names via git ls-remote.
Unlike local remote-tracking refs (which can be stale or pruned),
this queries origin directly. Returns an empty set on any error
(no remote, network failure, etc.) so callers treat it as “no remote
branches” and skip remote deletions safely.
Move files on a branch in a single commit.
Each element of moves is (old_rel_path, new_rel_path, content).
Writes each new file, stages it, then removes each old file via git rm.
Uses the same permanent-worktree / temp-worktree pattern as commit_files_to_branch.
Read a file’s content from a branch ref without changing working tree.
Prefers the local ref (reflects recent commits before push);
falls back to origin when no local ref exists.
Merge branch into default_branch (fast-forward or merge commit).
Pushes default_branch to origin when a remote exists.
List remote ticket/* branches with their last commit date.
Returns (branch_name_without_origin_prefix, commit_date) pairs.
All ticket/* branch names visible locally or remotely (deduplicated).
Local branches are included even when a remote exists, so that
unpushed branches (e.g. just created) are visible without a push.