Repository navigation
fix: run what is asked for while git is busy next, instead of dropping it - #14
Merged
Merged
Conversation
Merged
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.
What this changes
A click that changes the repository (Stage, Unstage, Discard, a hunk or line, a stash or branch action) was silently dropped when git was still busy with the previous job. Since live refresh, a reload starts whenever something changes in the working tree, so this happened more often: the click just did nothing. Now what you ask for while git is busy waits its turn and runs right after, in order.
This also lets the Discard button in the confirmation from #12 stay enabled: it no longer needs to be greyed out while git is busy, which on macOS CI made a click land in a frame where a reload had just started (the flaky
discarding_an_open_untracked_file_deletes_it_and_closes_iton the v0.5.0 release PR #13).How it is tested
what_is_asked_for_while_git_is_busy_runs_nextincrates/app/src/tests.rsstarts a reload and, while it runs, asks to stage a file and then commit it; both happen, in that order. It fails without the change (checked by dropping the queued operation again).The whole suite ran five times in a row locally without a failure.
cargo fmt --all,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepassIt adds as little code as the change needs, and removes what it makes unnecessary
Nothing in it comes from GitKraken or another closed-source client (see CONTRIBUTING.md)