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
Make showing commit message body in the revision graph optional #9301
Make showing commit message body in the revision graph optional #9301
Conversation
Hm, not sure what to make of that AppVeyor build break. Could use some guidance on what is missing here. |
The translation file is not good. |
new MenuCommand | ||
{ | ||
Name = "showMultiLineCommitMessagesToolStripMenuItem", | ||
Text = "Show multi-line commit messages", |
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.
Text = "Show multi-line commit messages", | |
Text = "Show commit body", |
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.
@pmiossec If this would also be ok for you, I will also change all the related variables, etc.
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 will also change all the related variables, etc.
Yes, please. For AppSettings
, I prefer to be even more specific (and to use Delphi-case for the new setting):
"showmultilinecommitmessages"
--> "ShowCommitBodyInRevisionGrid"
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 probably be clearer...
Text = "Show multi-line commit messages", | |
Text = "Show commit message body", |
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.
LGTM
new MenuCommand | ||
{ | ||
Name = "showMultiLineCommitMessagesToolStripMenuItem", | ||
Text = "Show multi-line commit messages", |
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 will also change all the related variables, etc.
Yes, please. For AppSettings
, I prefer to be even more specific (and to use Delphi-case for the new setting):
"showmultilinecommitmessages"
--> "ShowCommitBodyInRevisionGrid"
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.
Probably OK, one question.
Need to be rebased.
Have not run.
@@ -849,7 +849,7 @@ private void RefreshSelection() | |||
FillCommitInfo(selectedRevision); | |||
|
|||
// If the revision's body has been updated then the grid needs to be refreshed to display it | |||
if (selectedRevision is not null && selectedRevision.HasMultiLineMessage && oldBody != selectedRevision.Body) | |||
if (AppSettings.ShowCommitBodyInRevisionGrid && selectedRevision is not null && selectedRevision.HasMultiLineMessage && oldBody != selectedRevision.Body) |
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.
Is this correct when toggling the option?
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 also applied this from the original commit, but I think it is wrong.
Even if the option is disabled, the grid should be refreshed to display the multi-line indicator in case someone changed a commit message from single to multi-line, e.g. during amend.
This should probably be removed unless I'm wrong about the mechanics.
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 think it is correct. The comment above explains why.
[Toggle]ShowCommitBodyInRevisionGrid()
calls RevisionGridControl.Refresh()
.
…graph Original code by @FodderMK
56c86b8
to
8cb54db
Compare
Done |
@@ -849,7 +849,7 @@ private void RefreshSelection() | |||
FillCommitInfo(selectedRevision); | |||
|
|||
// If the revision's body has been updated then the grid needs to be refreshed to display it | |||
if (selectedRevision is not null && selectedRevision.HasMultiLineMessage && oldBody != selectedRevision.Body) | |||
if (AppSettings.ShowCommitBodyInRevisionGrid && selectedRevision is not null && selectedRevision.HasMultiLineMessage && oldBody != selectedRevision.Body) |
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 think it is correct. The comment above explains why.
[Toggle]ShowCommitBodyInRevisionGrid()
calls RevisionGridControl.Refresh()
.
Co-authored-by: Michael Seibt <36601201+mstv@users.noreply.github.com>
Co-authored-by: Michael Seibt <36601201+mstv@users.noreply.github.com>
…ToggleShowCommitBodyInRevisionGrid
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.
LGTM, have not run
Thank you |
Can this be cherry picked to the 3.5 branch? It seems like a minor change and I think there are quite a few people (inc. myself) who would really like to see it included in 3.5.2. |
…xtensions#9301) (cherry picked from commit 2c32e7e)
Original code by @FodderMK
Fixes #9298
Proposed changes
Screenshots
✒️ I contribute this code under The Developer Certificate of Origin.