Repository navigation
refactor(git): Fix stash status detection for all cases - #1586
Conversation
Consolidate stash default handlers to ensure "no local changes" is properly detected across all stash operations, not just the default push case. Signed-off-by: Nicolas Le Cam <[email protected]>
📊 Automated PR Analysis
SummaryRefactors git stash command handling to detect 'No local changes' status for all stash create operations (push/save), not just the default bare 'git stash' case. Consolidates duplicate message formatting into a shared format_stash_message() helper and merges previously separate code paths for the default stash and explicit push/save subcommands. Review Checklist
Linked issues: #1535 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
|
Hey @KuSh LGTM, reproduced bug and fix. Reproduced the bug on 0.37.2: git stash push and git stash push both report ok stash push when there's nothing to stash. Built the branch, all four variants (stash, stash push, stash push , stash save) now correctly return ok (nothing to stash). |
refactor(git): Fix stash status detection for all cases
refactor(git): Fix stash status detection for all cases
Summary
format_stash_message()helperCloses #1535
Test plan
cargo fmt --all && cargo clippy --all-targets && cargo testrtk git stashandrtk git stash push myfile.txtoutput inspected