feat!: add 'gra fetch', remove 'gra clean' and 'gra migrate' - #26
Merged
Merged
Conversation
Fetching was hidden inside 'gra clean', so the one command that went to the network was the one about removing worktrees, while 'gra ls' - the command whose SYNC column the fetch is for - stayed offline with no way to refresh it. 'gra fetch' runs 'git fetch --prune --all' in every repository under the gra root, several at a time, and 'gra ls --fetch' does that first and then prints the table. Every remote rather than just origin: a fork's 'upstream' is exactly the remote that goes stale. A repository that cannot be reached is named with git's reason and the others are still fetched. 'gra clean' is gone: 'gra done' removes a worktree with the same merged and patch-equivalent checks, one at a time and where you are standing. That takes the '.grakeep' keep marker with it - nothing reads it any more, so it is no longer written to the local exclude file. 'gra migrate' is gone too. It renamed worktrees named by gra 1.x-3.x, which have all been renamed by now. Co-Authored-By: Claude Opus 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.
Fetching was hidden inside
gra clean, so the one command that went to the network was the one about removing worktrees, whilegra ls— whoseSYNCcolumn the fetch is for — stayed offline with no way to refresh it.gra fetch(new)Runs
git fetch --prune --allin every repository under the gra root, several at a time:origin: a fork'supstreamis exactly the remote that goes stale.fetched 13 of 14 repositories).gra ls --fetchfetches first and then prints the table, soSYNCis current.gra cleanremovedgra doneremoves a worktree with the same merged / patch-equivalent checks, one at a time and where you are standing. That takes the.grakeepkeep marker with it — nothing reads it any more, so it is no longer written to the local exclude file. Existing repositories keep the now-inert exclude line; an existing.grakeepfile will start showing up as untracked.gra migrateremovedIt renamed worktrees named by gra 1.x–3.x, which have all been renamed by now. The dead
is_generated_name/WORD_LENGTHhelpers go with it.Net: -373 lines. Five new tests cover fetch + prune across repositories, the second remote, an unreachable repository not costing the others their fetch, the empty root, and
ls --fetchrefreshingSYNC.🤖 Generated with Claude Code