mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-16 16:05:00 +00:00
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
12d2b7721c
commit
f9b6116a76
20 changed files with 144 additions and 97 deletions
|
@ -1770,9 +1770,25 @@ namespace SourceGit.ViewModels
|
|||
fastForward.Click += (_, e) =>
|
||||
{
|
||||
if (CanCreatePopup())
|
||||
ShowAndStartPopup(new FastForwardWithoutCheckout(this, branch, upstream));
|
||||
ShowAndStartPopup(new ResetWithoutCheckout(this, branch, upstream));
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(fastForward);
|
||||
|
||||
var selectedCommit = (_histories?.DetailContext as CommitDetail)?.Commit;
|
||||
if (selectedCommit != null && !selectedCommit.SHA.Equals(branch.Head, StringComparison.Ordinal))
|
||||
{
|
||||
var move = new MenuItem();
|
||||
move.Header = App.Text("BranchCM.ResetToSelectedCommit", branch.Name, selectedCommit.SHA.Substring(0, 10));
|
||||
move.Icon = App.CreateMenuIcon("Icons.Reset");
|
||||
move.Click += (_, e) =>
|
||||
{
|
||||
if (CanCreatePopup())
|
||||
ShowPopup(new ResetWithoutCheckout(this, branch, selectedCommit));
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(move);
|
||||
}
|
||||
|
||||
var fetchInto = new MenuItem();
|
||||
fetchInto.Header = App.Text("BranchCM.FetchInto", upstream.FriendlyName, branch.Name);
|
||||
|
@ -1785,7 +1801,6 @@ namespace SourceGit.ViewModels
|
|||
e.Handled = true;
|
||||
};
|
||||
|
||||
menu.Items.Add(fastForward);
|
||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
menu.Items.Add(fetchInto);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue