Simplify the command set, and add 'gra each' - #31
Merged
Merged
Conversation
Neither command earned its keep. 'gra ls --fetch' already refreshes every repository, so 'gra fetch' was that minus the listing; and a worktree that should hold other work is what 'gra work' and plain 'git switch' are for. With 'gra switch' gone, the branch picker always offers the detached entry and the checked-out guard has no worktree to exempt, so both lose a parameter. The fetch machinery stays for 'gra ls --fetch' and 'gra done'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
'gra ls' shows the names and Tab completes them, so the picker was a second way to do what the shell already does. NAME is now required, and 'gra cd' just resolves it to the worktree's path. The worktree row type and its picker plumbing existed only for that listing, so resolving a name collapses to a filesystem probe that returns the path. fzf stays for the branch picker of 'gra work'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
'gra each git fetch --all --tags' runs that once per repository, in its bare checkout, so Git commands act on the repository itself. Repositories run one at a time with the command's output streaming to the terminal; failures do not stop the rest and are listed at the end, with a non-zero exit. Tab completes 'each' and the command name after it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
'gra each --wt git merge --ff-only' runs the command once per worktree instead of once per repository, labelled <repo>/<worktree> the way tmux windows are. Repositories without any worktree say so instead of silently doing nothing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
The release notes are the annotated tag's message, so cutting a release is one tag push and nothing to click. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
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.
gra has grown; this trims the commands that saw no use and replaces them with one general tool.
Removed
gra fetch—gra ls --fetchalready refreshes every repository; the fetch machinery stays for it and forgra done. The fork-clone hint now points atgra ls --fetch.gra switch— a worktree that should hold other work is whatgra workand plaingit switchare for. With it gone, the branch picker always offers the detached entry and the checked-out guard lost its exemption parameter.gra cd— NAME is now required;gra lsshows the names and Tab completes them. The worktree row type and its picker plumbing collapse into a filesystem probe. fzf stays for the branch picker ofgra work.Added
gra each <command>runs a command once in every repository, in its.baredirectory, one at a time with output streaming to the terminal:gra each git fetch --all --tags. Failures do not stop the rest; they are listed at the end and gra exits non-zero.gra each --wt <command>runs in every worktree instead, labelled<repo>/<worktree>:gra each --wt git merge --ff-only.Version goes 6.0.0 → 8.2.0 (two breaking steps, then two features). Net −218 lines. README and Bash completion follow the commands; 131 tests pass on the suite.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Nrfsj2RiFkXaetPthLZFZz
Generated by Claude Code