🐛 bug(various fixes): Improve error handling, UX, and robustness#28
Merged
iamrajjoshi merged 1 commit intomainfrom Feb 15, 2026
Merged
🐛 bug(various fixes): Improve error handling, UX, and robustness#28iamrajjoshi merged 1 commit intomainfrom
iamrajjoshi merged 1 commit intomainfrom
Conversation
- Fix silent error in runPostCheckoutHook — now warns on failure - Fix HasUnpushedCommits swallowing all git errors — only treats "no upstream" as unpushed, propagates real errors - Fix branch name collision from slash stripping — feature/auth now creates directory feature-auth instead of featureauth - Add cleanup on partial clone failure — removes bare repo and worktrees dir if any post-clone step fails - Add interactive worktree picker for pwd — numbered list when called with no argument - Expose postCheckoutHook in ww config CLI — list, get, and set - Improve run --all result aggregation — reports failed worktrees in summary error - Add tests for new behavior
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
runPostCheckoutHooknow warns viaui.Warnwhen the hook fails instead of silently swallowing the errorHasUnpushedCommitsswallowing all errors — only treats "no upstream" as unpushed; real git errors (network, permission, corruption) are now propagatedfeature/authnow creates directoryfeature-authinstead offeatureauth, preventing collisions with a branch literally namedfeatureauthbareDirandworktreesDirare cleaned uppwd— when called with no argument, shows a numbered list and prompts for selection (also makeswwgwith no args work interactively)postCheckoutHookinww configCLI — now visible in--list, gettable and settable viaww config postCheckoutHook <path>run --allresult aggregation — tracks failures and returns a summary error likecommand failed in 2/5 worktrees: main, paymentsAlso verified:
%wconsistently (no%vfound)--generate-shell-completionper urfave/cli/v3 APITest plan
go test ./...)go vet ./...cleanww config --listshowspostCheckoutHook--generate-shell-completionreturns all subcommandsTestNew_SlashedBranchDirName)TestConfig_PostCheckoutHook)TestPickWorktree_EmptyList)