Repository navigation
feat: enhanced drift details in gw status - #34
Merged
Merged
Conversation
Enhance gw status to show commit counts for drift detection instead of boolean flags. Fix two bugs in both status.rs and tree.rs where branches that are only behind remote or have a [gone] remote incorrectly report as up-to-date. Changes: - Show "N behind parent, needs rebase" instead of "needs rebase" - Show "diverged (N ahead, M behind remote)" instead of "diverged" - Fix behind-remote-only bug (was falling through to UpToDate) - Handle [gone] tracking state as NoRemote - Add Behind variant to tree.rs RemoteStatus for consistency - Consolidate rev_parse + boolean into rev_list_count (net 0 new git calls) - Add parse_count_after helper with unit tests Co-Authored-By: Claude Opus 4.6 <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
gw statusdrift flags: "3 behind parent, needs rebase" and "diverged (2 ahead, 1 behind remote)" instead of boolean flagsgw statusandgw tree[gone]remote tracking state (deleted remote branch) showed as "pushed" instead of "not pushed"rev_parse+ boolean check into a singlerev_list_countcall — net zero new git subprocess callsTest plan
parse_count_aftercover all 5%(upstream:track)format variantsgw statusshows clean output when no driftPost-Deploy Monitoring & Validation
No additional operational monitoring required: CLI tool with local-only changes to display formatting.
🤖 Generated with Claude Code