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
Fix #6276: "Show messages of annotated tags" truncates to ten lines without notice #9616
Fix #6276: "Show messages of annotated tags" truncates to ten lines without notice #9616
Conversation
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.
👍
Do you think you could add an non-UI integration a unit test to GitCommands.Tests (i.e. with ReferenceRepository
)?
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.
Long captions are truncated to not overflow the user with information. There has been several changes to limit commit messages in various tooltips for instance.
If number of branches exceeds 10, they are limited in the commit info.
This goes the other way. It could be done as "add ore info" too.
Or just add a comment like: No check for length, also displaying very long annotation messages
@mstv, you said:
Sorry, but are you meaning that I must add a comment in the code to warn devs that we are allowing for potentially large annotation messages..? Or are you suggesting I expose an option to the user to either display a truncated message (probably with an ellipsis at the end Or are you suggesting nothing at all, just making a general observation for everyone's information? Edit: @gerhardol said this, sorry!! |
…o ten lines without notice - shows the entire annotated tag message, whereas we were previously cutting it off after 10 - adds happy-path tests for GetTagMessage - TODO: in the future, we should add sad-path tests, which probably will require refactoring of GetTagMessage (cases such as passing in a non-tag reference)
d692aff
to
a708b7c
Compare
@RussKie I wrote the tests that you have asked for. They helped me catch the fact that I was accidentally appending an extraneous new line character on the end of the I left a note saying that we should put in "sad-path" tests to test things like if If you are fine with leaving things as-is, this PR should be good to go! |
@RussKie are there any pending items on this PR? |
I'd like to get @gerhardol sign off |
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.
The info is only shown in commit info, not in tooltips what I see, so the change should be fine.
Fixes #6276: "Show messages of annotated tags" truncates to ten lines without notice
Proposed changes
git cat-file -p <tag name>
to get full tag message, preventing the previous 10 line limitationScreenshots
Before
After
Test methodology
Tested the following scenarios:
Test environment(s)
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.