From fd2160e56e54447f83f178cd2f335148c5fd59c2 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 23 Apr 2024 16:52:55 +0800 Subject: [PATCH 01/26] feature: supports JetBrains Rider (#77) --- README.md | 3 ++- src/Models/ExternalTool.cs | 5 +++++ src/Native/Linux.cs | 1 + src/Native/MacOS.cs | 1 + src/Native/Windows.cs | 17 +++++++++++++++++ src/Resources/ExternalToolIcons/rider.png | Bin 0 -> 2141 bytes 6 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/Resources/ExternalToolIcons/rider.png diff --git a/README.md b/README.md index 4ccde98f..d759ef6b 100644 --- a/README.md +++ b/README.md @@ -62,9 +62,10 @@ This app supports open repository in external tools listed in the table below. | Visual Studio Code | YES | YES | YES | VSCODE_PATH | | Visual Studio Code - Insiders | YES | YES | YES | VSCODE_INSIDERS_PATH | | JetBrains Fleet | YES | YES | YES | FLEET_PATH | +| JetBrains Rider | YES | YES | YES | RIDER_PATH | | Sublime Text | YES | YES | YES | SUBLIME_TEXT_PATH | -You can set the given environment variable for special tool if it can NOT be found by this app automatically. +> You can set the given environment variable for special tool if it can NOT be found by this app automatically. ## Screenshots diff --git a/src/Models/ExternalTool.cs b/src/Models/ExternalTool.cs index cb50df58..bca67fc1 100644 --- a/src/Models/ExternalTool.cs +++ b/src/Models/ExternalTool.cs @@ -59,6 +59,11 @@ namespace SourceGit.Models TryAdd("JetBrains Fleet", "fleet", "\"{0}\"", "FLEET_PATH", platform_finder); } + public void Rider(Func platform_finder) + { + TryAdd("JetBrains Rider", "rider", "\"{0}\"", "RIDER_PATH", platform_finder); + } + public void SublimeText(Func platform_finder) { TryAdd("Sublime Text", "sublime_text", "\"{0}\"", "SUBLIME_TEXT_PATH", platform_finder); diff --git a/src/Native/Linux.cs b/src/Native/Linux.cs index 176941cc..1d3f750b 100644 --- a/src/Native/Linux.cs +++ b/src/Native/Linux.cs @@ -58,6 +58,7 @@ namespace SourceGit.Native finder.VSCode(() => FindExecutable("code")); finder.VSCodeInsiders(() => FindExecutable("code-insiders")); finder.Fleet(FindJetBrainFleet); + finder.Rider(() => string.Empty); finder.SublimeText(() => FindExecutable("subl")); return finder.Founded; } diff --git a/src/Native/MacOS.cs b/src/Native/MacOS.cs index f4ddc2ea..6d6e8759 100644 --- a/src/Native/MacOS.cs +++ b/src/Native/MacOS.cs @@ -33,6 +33,7 @@ namespace SourceGit.Native finder.VSCode(() => "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"); finder.VSCodeInsiders(() => "/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code"); finder.Fleet(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/Applications/Fleet.app/Contents/MacOS/Fleet"); + finder.Rider(() => string.Empty); finder.SublimeText(() => "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"); return finder.Founded; } diff --git a/src/Native/Windows.cs b/src/Native/Windows.cs index 2d22ac42..9325cea7 100644 --- a/src/Native/Windows.cs +++ b/src/Native/Windows.cs @@ -111,6 +111,7 @@ namespace SourceGit.Native finder.VSCode(FindVSCode); finder.VSCodeInsiders(FindVSCodeInsiders); finder.Fleet(() => $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\\Programs\\Fleet\\Fleet.exe"); + finder.Rider(FindRider); finder.SublimeText(FindSublimeText); return finder.Founded; } @@ -322,6 +323,22 @@ namespace SourceGit.Native return string.Empty; } + private string FindRider() + { + var rider = Environment.GetEnvironmentVariable("JetBrains Rider"); + if (!string.IsNullOrEmpty(rider)) + { + rider = rider.TrimEnd(';', ' '); + var path = Path.Combine(rider, "rider64.exe"); + if (File.Exists(path)) + { + return path; + } + } + + return string.Empty; + } + private string FindSublimeText() { var localMachine = Microsoft.Win32.RegistryKey.OpenBaseKey( diff --git a/src/Resources/ExternalToolIcons/rider.png b/src/Resources/ExternalToolIcons/rider.png new file mode 100644 index 0000000000000000000000000000000000000000..6ab3b8cbf80207a8f57fd8ea27befa92dadf0960 GIT binary patch literal 2141 zcmV-j2%`6iP)E-tQiFhkHW3A>JPHK`r2$%LDaAha&Ny@T z{l0g*-EIpfneNQ(y?f_;^PMy2oLPb>5cVCC(2nL3IUjKZT0U%Z#JK`3AvX7zAIEUhhAP5Xu z`T}T#L`-ku{ z6Cvz{1?HV4=5}gLE5Cyv!1g4rm2LUK_SIENK zdRvQ%yy9zpCLrPAk}S5?UFU}lfZli+DIo#So3&!yolmC$JvnAK8Hp6N+=&NP7gs2A3p5p3q`cbjT<*GWy%yZG&HDVVM-Yp865?{ zh&rS>%#=O-dIDtgPp}x~_*L3<9E#CpInA!Fu1?ppH*elVSy`DaKO>kqb7lv9AVDiN zXE{y4U@GLv%V6zsyMGbh+I5A*csF9RPx8tl?<=t? z077{i2red|NF;cQsttsD_wHf-{Q1^6f^S`m7cW-(!t1YIy;==&LXlCUMmhS`)zumR zaHi50CZj=l+^RgaGN27|wlfgYT(PlT3m_tb6H%XNA|9}tg8*aJtXUx`pOTWIZlS75 zoISgD?+yZhdu8cgOM=P((VA%=+^3ukme>K`m*)2J06-%M8byGyV#Nx_c*BMbh>MHU zrF>di8V(&gg!uS)b-ZuiK3uzYEjR;g^HvliYTKW(Dz5agg1|qUXspy|jL)$9038(? zeIkMw5#8nH=BlCWnl)>%eED*p_vYl}VBNZPYTs-&BRe}AK|r)xIwl{PTjCv}b` z=a^jC6V>TH+ZM0R^GA6&uCrvm`p#8%Fo24_`S{v5*XGJT_s}rWziTQ!5}HUK)F|ny z?K>2wULa)ot_pW|5V+Y^@r+l{-n!Cu5R57t9DQa=eq-CVI5}W6)eS+gC^CLy&sm+H zgYF(?U}rFn5LvROxVjtpfKz0c>g_%4-j^9z zcvdKDaVp&jge&}1-^13u*Z}WC|KFz>FO(&1QmRiUg THAg)l00000NkvXXu0mjfYd`9U literal 0 HcmV?d00001 From f92858994a980daabae88b7e3c029e33fdd7d44d Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 24 Apr 2024 22:07:48 +0800 Subject: [PATCH 02/26] readme: add description for folder that created by this app to store user settings, downloaded avatars and crash logs. --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d759ef6b..b2307580 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,20 @@ Opensource Git GUI client. > **Linux** only tested on **Ubuntu 22.04** on **X11**. -## How to use +## How to Use **To use this tool, you need to install Git(>=2.23.0) first.** You can download the latest stable from [Releases](https://github.com/sourcegit-scm/sourcegit/releases/latest) or download workflow artifacts from [Github Actions](https://github.com/sourcegit-scm/sourcegit/actions) to try this app based on latest commits. +This software creates a folder `$"{System.Environment.SpecialFolder.ApplicationData}/SourceGit"`, which is platform-dependent, to store user settings, downloaded avatars and crash logs. + +| OS | PATH | +| --- | --- | +| Windows | `C:\Users\USER_NAME\AppData\Roaming\SourceGit` | +| Linux | `/home/USER_NAME/.config/SourceGit` | +| macOS | `/Users/USER_NAME/.config/SourceGit` | + For **Windows** users: * **MSYS Git is NOT supported**. Please use official [Git for Windows](https://git-scm.com/download/win) instead. From 879f3cd76cff08cc8d2e3b2bb1011b2c80bd6344 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 24 Apr 2024 22:32:55 +0800 Subject: [PATCH 03/26] code_style: replace tab with 2-spaces in xaml --- src/Resources/Styles.axaml | 300 ++++++++++++++++++------------------- 1 file changed, 150 insertions(+), 150 deletions(-) diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index a1549a13..b1351f51 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -88,9 +88,9 @@ + Command="{Binding $parent[SelectableTextBlock].Copy}" + IsEnabled="{Binding $parent[SelectableTextBlock].CanCopy}" + InputGesture="{x:Static TextBox.CopyGesture}"> @@ -254,7 +254,7 @@ + Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" + CornerRadius="{TemplateBinding CornerRadius}" + ContentTemplate="{TemplateBinding ContentTemplate}" + Content="{TemplateBinding Content}" + Padding="{TemplateBinding Padding}" + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" /> + Width="4" + HorizontalAlignment="Left" VerticalAlignment="Stretch" + IsHitTestVisible="False" + IsVisible="{TemplateBinding IsSelected}"/> @@ -529,16 +529,16 @@ + Margin="8,4" + MaxWidth="{TemplateBinding MaxWidth}" + MinHeight="{TemplateBinding MinHeight}" + HorizontalAlignment="{TemplateBinding HorizontalAlignment}"> + ItemsPanel="{TemplateBinding ItemsPanel}" + Margin="{DynamicResource MenuFlyoutScrollerMargin}" + KeyboardNavigation.TabNavigation="Continue" + Grid.IsSharedSizeScope="True" /> @@ -557,20 +557,20 @@ + Margin="4" + Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="0" + Padding="4,2" + CornerRadius="{TemplateBinding CornerRadius}"> + Theme="{StaticResource FluentMenuScrollViewer}" + VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"> + ItemsPanel="{TemplateBinding ItemsPanel}" + Margin="{DynamicResource MenuFlyoutScrollerMargin}" + KeyboardNavigation.TabNavigation="Continue" + Grid.IsSharedSizeScope="True" /> @@ -581,18 +581,18 @@ @@ -906,15 +906,15 @@ + Width="{TemplateBinding Width}" + Height="{TemplateBinding Height}" + HorizontalAlignment="Center" + VerticalAlignment="Center"> + Data="M 4 0 L 8 4 L 4 8 Z" + Fill="{DynamicResource TreeViewItemForeground}" + HorizontalAlignment="Center" + VerticalAlignment="Center"/> @@ -933,11 +933,11 @@ @@ -949,7 +949,7 @@ - + - + @@ -109,11 +78,12 @@ Date: Sun, 28 Apr 2024 16:46:39 +0800 Subject: [PATCH 21/26] refactor: implementation of synchronous scrolling in side-by-side diff view --- src/Models/DiffResult.cs | 6 +++--- src/Views/TextDiffView.axaml.cs | 38 ++++++++++----------------------- 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/src/Models/DiffResult.cs b/src/Models/DiffResult.cs index 70219dcf..8a72b35d 100644 --- a/src/Models/DiffResult.cs +++ b/src/Models/DiffResult.cs @@ -388,11 +388,11 @@ namespace SourceGit.Models } [GeneratedRegex(@"^@@ \-(\d+),?\d* \+(\d+),?\d* @@")] - private static partial Regex indicatorRegex(); + private static partial Regex REG_INDICATOR(); private bool ProcessIndicatorForPatch(StringBuilder builder, TextDiffLine indicator, int idx, int start, int end, int ignoreRemoves, int ignoreAdds, bool revert, bool tailed) { - var match = indicatorRegex().Match(indicator.Content); + var match = REG_INDICATOR().Match(indicator.Content); var oldStart = int.Parse(match.Groups[1].Value); var newStart = int.Parse(match.Groups[2].Value) + ignoreRemoves - ignoreAdds; var oldCount = 0; @@ -461,7 +461,7 @@ namespace SourceGit.Models private bool ProcessIndicatorForPatchSingleSide(StringBuilder builder, TextDiffLine indicator, int idx, int start, int end, int ignoreRemoves, int ignoreAdds, bool revert, bool isOldSide, bool tailed) { - var match = indicatorRegex().Match(indicator.Content); + var match = REG_INDICATOR().Match(indicator.Content); var oldStart = int.Parse(match.Groups[1].Value); var newStart = int.Parse(match.Groups[2].Value) + ignoreRemoves - ignoreAdds; var oldCount = 0; diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs index 1f107138..9672110e 100644 --- a/src/Views/TextDiffView.axaml.cs +++ b/src/Views/TextDiffView.axaml.cs @@ -7,6 +7,7 @@ using System.Text; using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Primitives; +using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Media; using Avalonia.VisualTree; @@ -657,6 +658,7 @@ namespace SourceGit.Views UpdateTextMate(); + TextArea.PointerWheelChanged += OnTextAreaPointerWheelChanged; TextArea.TextView.ContextRequested += OnTextViewContextRequested; } @@ -676,21 +678,20 @@ namespace SourceGit.Views _textMate = null; } + TextArea.PointerWheelChanged -= OnTextAreaPointerWheelChanged; TextArea.TextView.ContextRequested -= OnTextViewContextRequested; GC.Collect(); } + private void OnTextAreaPointerWheelChanged(object sender, PointerWheelEventArgs e) + { + if (!TextArea.IsFocused) Focus(); + } + private void OnTextViewScrollChanged(object sender, ScrollChangedEventArgs e) { - if (_syncScrollingByOthers) - { - _syncScrollingByOthers = false; - } - else - { - SetCurrentValue(SyncScrollOffsetProperty, _scrollViewer.Offset); - } + if (TextArea.IsFocused) SetCurrentValue(SyncScrollOffsetProperty, _scrollViewer.Offset); } private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e) @@ -754,24 +755,8 @@ namespace SourceGit.Views } else if (change.Property == SyncScrollOffsetProperty) { - if (_scrollViewer == null) - return; - - var curOffset = _scrollViewer.Offset; - if (!curOffset.Equals(SyncScrollOffset)) - { - _syncScrollingByOthers = true; - - if (curOffset.X != SyncScrollOffset.X) - { - var offset = new Vector(Math.Min(_scrollViewer.ScrollBarMaximum.X, SyncScrollOffset.X), SyncScrollOffset.Y); - _scrollViewer.Offset = offset; - } - else - { - _scrollViewer.Offset = SyncScrollOffset; - } - } + if (_scrollViewer != null) + _scrollViewer.Offset = SyncScrollOffset; } else if (change.Property == UseSyntaxHighlightingProperty) { @@ -813,7 +798,6 @@ namespace SourceGit.Views private TextMate.Installation _textMate; private readonly LineStyleTransformer _lineStyleTransformer = null; private ScrollViewer _scrollViewer = null; - private bool _syncScrollingByOthers = false; } public partial class TextDiffView : UserControl From 5d1de3730800bfb50a6301f92eaf615e3b033d7c Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 28 Apr 2024 16:50:06 +0800 Subject: [PATCH 22/26] optimize: only set Offset from SyncScrollOffset while it's not focused. --- src/Views/TextDiffView.axaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs index 9672110e..3969c1b7 100644 --- a/src/Views/TextDiffView.axaml.cs +++ b/src/Views/TextDiffView.axaml.cs @@ -755,7 +755,7 @@ namespace SourceGit.Views } else if (change.Property == SyncScrollOffsetProperty) { - if (_scrollViewer != null) + if (!TextArea.IsFocused && _scrollViewer != null) _scrollViewer.Offset = SyncScrollOffset; } else if (change.Property == UseSyntaxHighlightingProperty) From 1509b8ab706daef80a523bd27081509f607716b0 Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 28 Apr 2024 17:55:49 +0800 Subject: [PATCH 23/26] ux: right margin for commit message --- src/Views/CommitBaseInfo.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/CommitBaseInfo.axaml b/src/Views/CommitBaseInfo.axaml index b09bb6d6..4b257516 100644 --- a/src/Views/CommitBaseInfo.axaml +++ b/src/Views/CommitBaseInfo.axaml @@ -99,7 +99,7 @@ - + From df66bacbd29f6399ebbdd3646aaf190f849aacc7 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 29 Apr 2024 09:30:37 +0800 Subject: [PATCH 24/26] enhance: reset commit message after a merge request has been aborted --- src/ViewModels/InProgressContexts.cs | 4 ++-- src/ViewModels/Repository.cs | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ViewModels/InProgressContexts.cs b/src/ViewModels/InProgressContexts.cs index e38cab13..efeedd12 100644 --- a/src/ViewModels/InProgressContexts.cs +++ b/src/ViewModels/InProgressContexts.cs @@ -22,9 +22,9 @@ namespace SourceGit.ViewModels Cmd = cmd; } - public void Abort() + public bool Abort() { - new Commands.Command() + return new Commands.Command() { WorkingDirectory = Repository, Context = Repository, diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 4d800a48..db35f4a9 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -511,7 +511,11 @@ namespace SourceGit.ViewModels if (_inProgressContext != null) { SetWatcherEnabled(false); - await Task.Run(_inProgressContext.Abort); + var succ = await Task.Run(_inProgressContext.Abort); + if (succ && _workingCopy != null) + { + _workingCopy.CommitMessage = string.Empty; + } SetWatcherEnabled(true); } else From 84568e573ad96383495cffe7f35ce949f52c9244 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 29 Apr 2024 10:54:29 +0800 Subject: [PATCH 25/26] feature: test if conflicts have been resolved manually (#96) --- src/Commands/IsConflictResolved.cs | 20 ++++++++++ src/Resources/Locales/en_US.axaml | 2 + src/Resources/Locales/zh_CN.axaml | 2 + src/ViewModels/WorkingCopy.cs | 59 +++++++++++++++++++----------- src/Views/WorkingCopy.axaml | 18 ++++++--- 5 files changed, 74 insertions(+), 27 deletions(-) create mode 100644 src/Commands/IsConflictResolved.cs diff --git a/src/Commands/IsConflictResolved.cs b/src/Commands/IsConflictResolved.cs new file mode 100644 index 00000000..49bc56fa --- /dev/null +++ b/src/Commands/IsConflictResolved.cs @@ -0,0 +1,20 @@ +namespace SourceGit.Commands +{ + public class IsConflictResolved : Command + { + public IsConflictResolved(string repo, Models.Change change) + { + var opt = new Models.DiffOption(change, true); + + WorkingDirectory = repo; + Context = repo; + Args = $"diff -a --ignore-cr-at-eol --check {opt}"; + } + + public bool Result() + { + var rs = ReadToEnd(); + return rs.IsSuccess; + } + } +} diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index fc2260a8..fed4f46b 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -427,11 +427,13 @@ Sort Changes Amend + You can stage this file now. COMMIT COMMIT & PUSH Enter commit message CTRL + Enter CONFLICTS DETECTED + FILE CONFLICTS ARE RESOLVED RECENT INPUT MESSAGES INCLUDE UNTRACKED FILES MESSAGE HISTORIES diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index ae5a624f..c2500d54 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -427,11 +427,13 @@ 排序 本地更改 修补(--amend) + 现在您已可将其加入暂存区中 提交 提交并推送 填写提交信息 CTRL + Enter 检测到冲突 + 文件冲突已解决 最近输入的提交信息 显示未跟踪文件 历史提交信息 diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index 24e733a0..76c3be50 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -12,9 +12,27 @@ using CommunityToolkit.Mvvm.ComponentModel; namespace SourceGit.ViewModels { - public class ConflictContext + public class ConflictContext : ObservableObject { - public Models.Change Change { get; set; } + public bool IsResolved + { + get => _isResolved; + set => SetProperty(ref _isResolved, value); + } + + public ConflictContext(string repo, Models.Change change) + { + Task.Run(() => + { + var result = new Commands.IsConflictResolved(repo, change).Result(); + Dispatcher.UIThread.Post(() => + { + IsResolved = result; + }); + }); + } + + private bool _isResolved = false; } public class WorkingCopy : ObservableObject @@ -296,9 +314,9 @@ namespace SourceGit.ViewModels { DetailContext = null; } - else if (change.IsConflit) + else if (change.IsConflit && isUnstaged) { - DetailContext = new ConflictContext() { Change = change }; + DetailContext = new ConflictContext(_repo.FullPath, change); } else { @@ -432,26 +450,23 @@ namespace SourceGit.ViewModels _repo.SetWatcherEnabled(true); } - public async void UseExternalMergeTool() + public async void UseExternalMergeTool(Models.Change change) { - if (_detailContext is ConflictContext ctx) + var type = Preference.Instance.ExternalMergeToolType; + var exec = Preference.Instance.ExternalMergeToolPath; + + var tool = Models.ExternalMerger.Supported.Find(x => x.Type == type); + if (tool == null) { - var type = Preference.Instance.ExternalMergeToolType; - var exec = Preference.Instance.ExternalMergeToolPath; - - var tool = Models.ExternalMerger.Supported.Find(x => x.Type == type); - if (tool == null) - { - App.RaiseException(_repo.FullPath, "Invalid merge tool in preference setting!"); - return; - } - - var args = tool.Type != 0 ? tool.Cmd : Preference.Instance.ExternalMergeToolCmd; - - _repo.SetWatcherEnabled(false); - await Task.Run(() => Commands.MergeTool.OpenForMerge(_repo.FullPath, exec, args, ctx.Change.Path)); - _repo.SetWatcherEnabled(true); + App.RaiseException(_repo.FullPath, "Invalid merge tool in preference setting!"); + return; } + + var args = tool.Type != 0 ? tool.Cmd : Preference.Instance.ExternalMergeToolCmd; + + _repo.SetWatcherEnabled(false); + await Task.Run(() => Commands.MergeTool.OpenForMerge(_repo.FullPath, exec, args, change.Path)); + _repo.SetWatcherEnabled(true); } public async void DoCommit(bool autoPush) @@ -554,7 +569,7 @@ namespace SourceGit.ViewModels openMerger.Header = App.Text("FileCM.OpenWithExternalMerger"); openMerger.Click += (_, e) => { - UseExternalMergeTool(); + UseExternalMergeTool(change); e.Handled = true; }; diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml index 3e52ffc3..57931284 100644 --- a/src/Views/WorkingCopy.axaml +++ b/src/Views/WorkingCopy.axaml @@ -319,11 +319,19 @@ - - - - - + + + + + + + + + + + + + From 4c7ddf14ac5ca1a4db78a70262deb24f674e6ba5 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 29 Apr 2024 11:00:57 +0800 Subject: [PATCH 26/26] version: Release 8.10 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f7b1c8ff..8d04a0f3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.9 \ No newline at end of file +8.10 \ No newline at end of file