mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-22 02:45:00 +00:00
enhance: clear commit message before merging/cherry-picking/rebasing/reverting to allow SourceGit
read it from git (#1414)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
7de5991ecb
commit
7e2f3bec8c
11 changed files with 30 additions and 17 deletions
|
@ -126,7 +126,7 @@
|
|||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
|
||||
<Button Classes="icon_button" Width="32" Command="{Binding NavigateToCurrentHead}" ToolTip.Tip="{DynamicResource Text.Repository.NavigateToCurrentHead}">
|
||||
<Button Classes="icon_button" Width="32" Click="NavigateToHead" ToolTip.Tip="{DynamicResource Text.Repository.NavigateToCurrentHead}">
|
||||
<Path Width="13" Height="13" Margin="0,2,0,0" Data="{StaticResource Icons.Target}" Fill="{DynamicResource Brush.FG1}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
|
|
@ -150,5 +150,14 @@ namespace SourceGit.Views
|
|||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void NavigateToHead(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is ViewModels.Repository { CurrentBranch: { } } repo)
|
||||
{
|
||||
repo.NavigateToCommit(repo.CurrentBranch.Head);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue