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
BackgroundFetch & push --force-with-lease : add a warning message #8533
BackgroundFetch & push --force-with-lease : add a warning message #8533
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8533 +/- ##
==========================================
- Coverage 55.59% 55.10% -0.49%
==========================================
Files 888 899 +11
Lines 64110 64776 +666
Branches 11467 11629 +162
==========================================
+ Hits 35640 35694 +54
- Misses 25766 26344 +578
- Partials 2704 2738 +34
Flags with carried forward coverage won't be shown. Click here to find out more. |
{ | ||
tb.Multiline = true; | ||
tb.Height = 500; | ||
}); |
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 textbox readonly?
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.
Yes. That's handled by PseudoSetting
.
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.
👍
@@ -25,6 +25,11 @@ public BackgroundFetchPlugin() : base(true) | |||
private IDisposable _cancellationToken; | |||
private IGitUICommands _currentGitUiCommands; | |||
|
|||
private readonly PseudoSetting _warningForceWithLease = new PseudoSetting("Warning: be aware that the push force with lease feature should be used carefully when the periodic background fetch is enabled. Indeed, the protection brought by this feature could be bypassed if the background fetch has updated the remote branches. And you could loose the commits newly pushed by someone else. So be sure to refresh the revsion grid before doing a force push with lease.", textboxSettings: tb => |
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.
Few typos in the original text.
The text looks a bit verbose, what do you think of this variant?
private readonly PseudoSetting _warningForceWithLease = new PseudoSetting("Warning: be aware that the push force with lease feature should be used carefully when the periodic background fetch is enabled. Indeed, the protection brought by this feature could be bypassed if the background fetch has updated the remote branches. And you could loose the commits newly pushed by someone else. So be sure to refresh the revsion grid before doing a force push with lease.", textboxSettings: tb => | |
private readonly PseudoSetting _warningForceWithLease = new PseudoSetting("WARNING: be careful when force push with lease having the periodic background fetch enabled but chose not to auto-refresh after each fetch. You could lose new commits pushed by others to the remote branch. Be sure to refresh the revision grid before doing a force push with lease.", textboxSettings: tb => |
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.
updated.
for when using the "git push --force-with-lease" feature
f2a1102
to
f8f0265
Compare
Proposed changes
about some risk when using the "git push --force-with-lease" feature
Screenshots
Before
no warning message.
After
Test methodology
Test environment(s)