New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indicate merged branches in left panel #8035
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8035 +/- ##
==========================================
- Coverage 49.51% 49.50% -0.01%
==========================================
Files 849 849
Lines 61019 61050 +31
Branches 10965 10979 +14
==========================================
+ Hits 30213 30224 +11
+ Misses 28580 28564 -16
- Partials 2226 2262 +36
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
18393c7
to
d6e1245
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Well presented
cancellationToken.ThrowIfCancellationRequested(); | ||
var mergedBranches | ||
= selectedGuid == null ? new HashSet<string>() | ||
: (await Module.GetMergedBranchesAsync(includeRemote: true, fullRefname: true, commit: selectedGuid)).ToHashSet(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This adds 100 ms CPU time for me in a GE repo with 600 ms on my local relative new PC with Windows Defender. As a comparision git-status requires 150 ms. On repos with viruses like Symantec this can be substantially more even if git-status should have a greater hit (as more files are read there). This is async and will not affect the interactivity and should have a minimal impact on the perceived CPU use by GE.
@@ -112,10 +112,46 @@ protected void SelectRevision() | |||
} | |||
} | |||
|
|||
private sealed class LocalBranchNode : BaseBranchNode, IGitRefActions, ICanRename, ICanDelete | |||
private class BaseBranchLeafNode : BaseBranchNode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a separate file?
(For me this is fine, but there are other with more opinions reviewing later, you know who I mean.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL, are you fan of "him who we do not name" or "he who must not be named"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to break all nested classes into own files. I'm not going to block the PR for this though, it is a separate clean up task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OT: I know who reads and know all, so if I use the name or not makes no difference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to break all nested classes into own files.
I thought about it. But there were bugs to analyze as now again.
Perhaps I'll cleanup this in this PR later.
var mergedBranches | ||
= selectedGuid == null ? new HashSet<string>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var mergedBranches | |
= selectedGuid == null ? new HashSet<string>() | |
var mergedBranches = selectedGuid == null | |
? new HashSet<string>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be Array.Empty<string>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be
Array.Empty<string>
?
I need something for lookups. Would become Array.Empty<string>().ToHashSet()
because HashSet
lacks Empty
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I'd like to take this into 3.4. I suggest just rebase on top of 3.4 for that, instead of the master. |
call RevisionGrid.GetSelectedRevisions() once
f6bbac3
to
dfd4913
Compare
@msftbot merge in 4 hours |
Hello @mstv! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
Fixes #6494
Proposed changes
RevisionGridControl.LastSelected
Screenshots
Before
After
Test methodology
Test environment(s)
✒️ I contribute this code under The Developer Certificate of Origin.