Add undo, locked branches, remote-only view and script mode - #5
Merged
Merged
Conversation
A mechanical move by an AST script: each top-level declaration went to the file for its layer, with no hand edits. The Makefile now rebuilds on any .go file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Safety: - fetch/push run with GIT_TERMINAL_PROMPT=0, no controlling tty, and a 60s timeout, so a remote asking for a password cannot hang the TUI - commit subjects, git errors and raw diffs are stripped of escape codes - ctrl+c while deleting needs a second press - current, other-worktree (+) and protected (P, pruner.protect globs) branches are locked against selection UX: - u undoes the last delete; quitting prints restore commands - m selects merged branches older than N days (pruner.staleDays) - rows fit the terminal; list height counts status/error lines - cursor starts on row 1; clean gone branches no longer read "not merged" - sort choice persists between runs - tab lists remote branches no local branch tracks; R deletes them, c creates a tracking branch Performance: - the list paints before the merge queries, which run from Init - v loads diffs in the background; resize re-runs delta once, debounced Script mode: --prune-gone / --merged-older-than, --fetch, --yes, --dry-run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two commits:
main.gointogit.go,model.goandview.go. An AST script moved the code with no hand edits. Review this commit apart from the second one.docs/improvements.md.Safety
fetchandpushrun withGIT_TERMINAL_PROMPT=0and without a terminal, and stop after 60s. A remote that asks for a password cannot freeze the screen.+) and a protected branch (P). The default branch andpruner.protectglobs are protected.UX
uundoes the last delete. When you quit, the app prints restore commands.mselects merged branches older than N days. N starts atpruner.staleDays, default 90.tablists remote branches that no local branch tracks.Rdeletes them.ccreates a local branch that tracks one.Performance
Init.vloads the diff in the background. A resize runs delta again only once, after a short wait.Script mode
--prune-gone,--merged-older-than DAYS,--fetch,--yes,--dry-run. Nothing is deleted without--yes. Script mode never deletes remote branches.Behavior changes
entergoes back to the list.qquits.Tests
go test -race. 17 of them are new.gitonPATHtests the network time limit.🤖 Generated with Claude Code