Repository navigation
fix: show HEAD in the details when the selected commit left the graph - #24
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
After a reset, an undo or a rebase moved a branch back, the details panel kept showing the commit that was selected, even though it was no longer in the graph. It now shows
HEADinstead, the same as when nothing is selected or the uncommitted changes are gone. The check is simply "is the selection in the graph", which covers all three cases with less code than before.How it is tested
App test through the accessibility tree: with the last commit selected, a hard reset made outside GitCraft takes it out of the graph and the details; the details show
HEAD. Without the fix the test fails.Tried in the app: with the newest commit selected, a hard reset of two commits on the command line; the details moved to the new
HEADby themselves.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)