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
Add git stash --staged #9848
Add git stash --staged #9848
Conversation
@@ -1178,11 +1180,25 @@ private void InitializeComponent() | |||
this.ResetAuthor.UseVisualStyleBackColor = true; | |||
this.ResetAuthor.Visible = false; | |||
// | |||
// StashStaged |
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.
These controls should be in the bottom of the side.
Mono did not support that setup, why it was like this originally.
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.
Reverted to only insert StashStaged
.
Have I got it right?
Should the private Button ResetUnStaged;
be moved up to the section with the other Button
s, too?
GitUI/CommandsDialogs/FormBrowse.cs
Outdated
@@ -266,7 +266,7 @@ public FormBrowse(GitUICommands commands, BrowseArguments args) | |||
MainSplitContainer.Visible = false; | |||
MainSplitContainer.SplitterDistance = DpiUtil.Scale(260); | |||
|
|||
stashStagedToolStripMenuItem.Visible = GitVersion.Current.SupportStashStaged; | |||
stashStagedToolStripMenuItem.Visible = Module.GitVersion.SupportStashStaged; |
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.
Also need to be moved to InternalInitialize() as it may change when the module is updated.
A change still required to GitVersion, this was the first change that affected a supported setup...
Check for WSL Git version was always using Windows version
I pushed changes to a private branch. |
Fixes #9839
Proposed changes
git stash --staged
command to FormBrowse and to FormCommitif Git version is >= 2.35.0
My use case: Occasionally, I want to swap staged and unstaged, e.g. if the previous commit needs to be amended or when something different is to be committed urgently.
Screenshots
Before
After
Test methodology
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.