Skip to content

Commit 92f215d

Browse files
committed
Merge branch 'release/v2025.15'
2 parents 387b68c + 2e1cf76 commit 92f215d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1355
-551
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* Search commits
4040
* GitFlow
4141
* Git LFS
42+
* Bisect
4243
* Issue Link
4344
* Workspace
4445
* Custom Action

TRANSLATION.md

+65-38
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ This document shows the translation status of each locale file in the repository
66

77
### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen)
88

9-
### ![de__DE](https://img.shields.io/badge/de__DE-96.19%25-yellow)
9+
### ![de__DE](https://img.shields.io/badge/de__DE-95.19%25-yellow)
1010

1111
<details>
1212
<summary>Missing keys in de_DE.axaml</summary>
1313

14+
- Text.Bisect
15+
- Text.Bisect.Abort
16+
- Text.Bisect.Bad
17+
- Text.Bisect.Detecting
18+
- Text.Bisect.Good
19+
- Text.Bisect.Skip
20+
- Text.Bisect.WaitingForRange
1421
- Text.BranchUpstreamInvalid
1522
- Text.CommitCM.CopyAuthor
1623
- Text.CommitCM.CopyCommitter
@@ -29,6 +36,7 @@ This document shows the translation status of each locale file in the repository
2936
- Text.Preferences.AI.Streaming
3037
- Text.Preferences.Appearance.EditorTabWidth
3138
- Text.Preferences.General.ShowTagsInGraph
39+
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
3240
- Text.Repository.ViewLogs
3341
- Text.StashCM.SaveAsPatch
3442
- Text.ViewLogs
@@ -43,27 +51,20 @@ This document shows the translation status of each locale file in the repository
4351

4452
</details>
4553

46-
### ![es__ES](https://img.shields.io/badge/es__ES-98.95%25-yellow)
54+
### ![es__ES](https://img.shields.io/badge/es__ES-%E2%88%9A-brightgreen)
4755

48-
<details>
49-
<summary>Missing keys in es_ES.axaml</summary>
50-
51-
- Text.CommitCM.CopyAuthor
52-
- Text.CommitCM.CopyCommitter
53-
- Text.CommitCM.CopySubject
54-
- Text.Repository.ViewLogs
55-
- Text.ViewLogs
56-
- Text.ViewLogs.Clear
57-
- Text.ViewLogs.CopyLog
58-
- Text.ViewLogs.Delete
59-
60-
</details>
61-
62-
### ![fr__FR](https://img.shields.io/badge/fr__FR-97.51%25-yellow)
56+
### ![fr__FR](https://img.shields.io/badge/fr__FR-96.49%25-yellow)
6357

6458
<details>
6559
<summary>Missing keys in fr_FR.axaml</summary>
6660

61+
- Text.Bisect
62+
- Text.Bisect.Abort
63+
- Text.Bisect.Bad
64+
- Text.Bisect.Detecting
65+
- Text.Bisect.Good
66+
- Text.Bisect.Skip
67+
- Text.Bisect.WaitingForRange
6768
- Text.CommitCM.CopyAuthor
6869
- Text.CommitCM.CopyCommitter
6970
- Text.CommitCM.CopySubject
@@ -73,6 +74,7 @@ This document shows the translation status of each locale file in the repository
7374
- Text.ConfirmEmptyCommit.NoLocalChanges
7475
- Text.ConfirmEmptyCommit.StageAllThenCommit
7576
- Text.ConfirmEmptyCommit.WithLocalChanges
77+
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
7678
- Text.Repository.ViewLogs
7779
- Text.ViewLogs
7880
- Text.ViewLogs.Clear
@@ -86,11 +88,18 @@ This document shows the translation status of each locale file in the repository
8688

8789
</details>
8890

89-
### ![it__IT](https://img.shields.io/badge/it__IT-97.24%25-yellow)
91+
### ![it__IT](https://img.shields.io/badge/it__IT-96.23%25-yellow)
9092

9193
<details>
9294
<summary>Missing keys in it_IT.axaml</summary>
9395

96+
- Text.Bisect
97+
- Text.Bisect.Abort
98+
- Text.Bisect.Bad
99+
- Text.Bisect.Detecting
100+
- Text.Bisect.Good
101+
- Text.Bisect.Skip
102+
- Text.Bisect.WaitingForRange
94103
- Text.CommitCM.CopyAuthor
95104
- Text.CommitCM.CopyCommitter
96105
- Text.CommitCM.CopySubject
@@ -102,6 +111,7 @@ This document shows the translation status of each locale file in the repository
102111
- Text.ConfirmEmptyCommit.WithLocalChanges
103112
- Text.CopyFullPath
104113
- Text.Preferences.General.ShowTagsInGraph
114+
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
105115
- Text.Repository.ViewLogs
106116
- Text.ViewLogs
107117
- Text.ViewLogs.Clear
@@ -115,11 +125,18 @@ This document shows the translation status of each locale file in the repository
115125

116126
</details>
117127

118-
### ![ja__JP](https://img.shields.io/badge/ja__JP-97.24%25-yellow)
128+
### ![ja__JP](https://img.shields.io/badge/ja__JP-96.23%25-yellow)
119129

120130
<details>
121131
<summary>Missing keys in ja_JP.axaml</summary>
122132

133+
- Text.Bisect
134+
- Text.Bisect.Abort
135+
- Text.Bisect.Bad
136+
- Text.Bisect.Detecting
137+
- Text.Bisect.Good
138+
- Text.Bisect.Skip
139+
- Text.Bisect.WaitingForRange
123140
- Text.CommitCM.CopyAuthor
124141
- Text.CommitCM.CopyCommitter
125142
- Text.CommitCM.CopySubject
@@ -129,6 +146,7 @@ This document shows the translation status of each locale file in the repository
129146
- Text.ConfirmEmptyCommit.NoLocalChanges
130147
- Text.ConfirmEmptyCommit.StageAllThenCommit
131148
- Text.ConfirmEmptyCommit.WithLocalChanges
149+
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
132150
- Text.Repository.FilterCommits
133151
- Text.Repository.Tags.OrderByNameDes
134152
- Text.Repository.ViewLogs
@@ -144,7 +162,7 @@ This document shows the translation status of each locale file in the repository
144162

145163
</details>
146164

147-
### ![pt__BR](https://img.shields.io/badge/pt__BR-88.71%25-yellow)
165+
### ![pt__BR](https://img.shields.io/badge/pt__BR-87.79%25-yellow)
148166

149167
<details>
150168
<summary>Missing keys in pt_BR.axaml</summary>
@@ -155,6 +173,13 @@ This document shows the translation status of each locale file in the repository
155173
- Text.ApplyStash.DropAfterApply
156174
- Text.ApplyStash.RestoreIndex
157175
- Text.ApplyStash.Stash
176+
- Text.Bisect
177+
- Text.Bisect.Abort
178+
- Text.Bisect.Bad
179+
- Text.Bisect.Detecting
180+
- Text.Bisect.Good
181+
- Text.Bisect.Skip
182+
- Text.Bisect.WaitingForRange
158183
- Text.BranchCM.CustomAction
159184
- Text.BranchCM.MergeMultiBranches
160185
- Text.BranchUpstreamInvalid
@@ -201,6 +226,7 @@ This document shows the translation status of each locale file in the repository
201226
- Text.Preferences.General.DateFormat
202227
- Text.Preferences.General.ShowChildren
203228
- Text.Preferences.General.ShowTagsInGraph
229+
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
204230
- Text.Preferences.Git.SSLVerify
205231
- Text.Repository.FilterCommits
206232
- Text.Repository.HistoriesLayout
@@ -238,28 +264,20 @@ This document shows the translation status of each locale file in the repository
238264

239265
</details>
240266

241-
### ![ru__RU](https://img.shields.io/badge/ru__RU-98.82%25-yellow)
242-
243-
<details>
244-
<summary>Missing keys in ru_RU.axaml</summary>
245-
246-
- Text.CommitCM.CopyAuthor
247-
- Text.CommitCM.CopyCommitter
248-
- Text.CommitCM.CopySubject
249-
- Text.CommitMessageTextBox.SubjectCount
250-
- Text.Repository.ViewLogs
251-
- Text.ViewLogs
252-
- Text.ViewLogs.Clear
253-
- Text.ViewLogs.CopyLog
254-
- Text.ViewLogs.Delete
255-
256-
</details>
267+
### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen)
257268

258-
### ![ta__IN](https://img.shields.io/badge/ta__IN-97.51%25-yellow)
269+
### ![ta__IN](https://img.shields.io/badge/ta__IN-96.49%25-yellow)
259270

260271
<details>
261272
<summary>Missing keys in ta_IN.axaml</summary>
262273

274+
- Text.Bisect
275+
- Text.Bisect.Abort
276+
- Text.Bisect.Bad
277+
- Text.Bisect.Detecting
278+
- Text.Bisect.Good
279+
- Text.Bisect.Skip
280+
- Text.Bisect.WaitingForRange
263281
- Text.CommitCM.CopyAuthor
264282
- Text.CommitCM.CopyCommitter
265283
- Text.CommitCM.CopySubject
@@ -269,6 +287,7 @@ This document shows the translation status of each locale file in the repository
269287
- Text.ConfirmEmptyCommit.NoLocalChanges
270288
- Text.ConfirmEmptyCommit.StageAllThenCommit
271289
- Text.ConfirmEmptyCommit.WithLocalChanges
290+
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
272291
- Text.Repository.ViewLogs
273292
- Text.UpdateSubmodules.Target
274293
- Text.ViewLogs
@@ -282,16 +301,24 @@ This document shows the translation status of each locale file in the repository
282301

283302
</details>
284303

285-
### ![uk__UA](https://img.shields.io/badge/uk__UA-98.69%25-yellow)
304+
### ![uk__UA](https://img.shields.io/badge/uk__UA-97.66%25-yellow)
286305

287306
<details>
288307
<summary>Missing keys in uk_UA.axaml</summary>
289308

309+
- Text.Bisect
310+
- Text.Bisect.Abort
311+
- Text.Bisect.Bad
312+
- Text.Bisect.Detecting
313+
- Text.Bisect.Good
314+
- Text.Bisect.Skip
315+
- Text.Bisect.WaitingForRange
290316
- Text.CommitCM.CopyAuthor
291317
- Text.CommitCM.CopyCommitter
292318
- Text.CommitCM.CopySubject
293319
- Text.CommitMessageTextBox.SubjectCount
294320
- Text.ConfigureWorkspace.Name
321+
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
295322
- Text.Repository.ViewLogs
296323
- Text.ViewLogs
297324
- Text.ViewLogs.Clear

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.14
1+
2025.15

src/App.Commands.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ public static bool IsCheckForUpdateCommandVisible
3737
}
3838
}
3939

40-
public static readonly Command OpenPreferencesCommand = new Command(_ => OpenDialog(new Views.Preferences()));
41-
public static readonly Command OpenHotkeysCommand = new Command(_ => OpenDialog(new Views.Hotkeys()));
40+
public static readonly Command OpenPreferencesCommand = new Command(_ => ShowWindow(new Views.Preferences(), false));
41+
public static readonly Command OpenHotkeysCommand = new Command(_ => ShowWindow(new Views.Hotkeys(), false));
4242
public static readonly Command OpenAppDataDirCommand = new Command(_ => Native.OS.OpenInFileManager(Native.OS.DataDir));
43-
public static readonly Command OpenAboutCommand = new Command(_ => OpenDialog(new Views.About()));
43+
public static readonly Command OpenAboutCommand = new Command(_ => ShowWindow(new Views.About(), false));
4444
public static readonly Command CheckForUpdateCommand = new Command(_ => (Current as App)?.Check4Update(true));
4545
public static readonly Command QuitCommand = new Command(_ => Quit(0));
4646
public static readonly Command CopyTextBlockCommand = new Command(p =>

src/App.axaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<NativeMenu.Menu>
3636
<NativeMenu>
3737
<NativeMenuItem Header="{DynamicResource Text.About.Menu}" Command="{x:Static s:App.OpenAboutCommand}"/>
38-
<NativeMenuItem Header="{DynamicResource Text.Hotkeys}" Command="{x:Static s:App.OpenHotkeysCommand}"/>
38+
<NativeMenuItem Header="{DynamicResource Text.Hotkeys}" Command="{x:Static s:App.OpenHotkeysCommand}" Gesture="F1"/>
3939
<NativeMenuItem Header="{DynamicResource Text.SelfUpdate}" Command="{x:Static s:App.CheckForUpdateCommand}" IsVisible="{x:Static s:App.IsCheckForUpdateCommandVisible}"/>
4040
<NativeMenuItemSeparator/>
4141
<NativeMenuItem Header="{DynamicResource Text.Preferences}" Command="{x:Static s:App.OpenPreferencesCommand}" Gesture="⌘+,"/>

src/App.axaml.cs

+39-9
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,36 @@ private static void LogException(Exception ex)
105105
#endregion
106106

107107
#region Utility Functions
108-
public static void OpenDialog(Window window)
108+
public static void ShowWindow(object data, bool showAsDialog)
109109
{
110-
if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
111-
window.ShowDialog(owner);
110+
if (data is Views.ChromelessWindow window)
111+
{
112+
if (showAsDialog && Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
113+
window.ShowDialog(owner);
114+
else
115+
window.Show();
116+
117+
return;
118+
}
119+
120+
var dataTypeName = data.GetType().FullName;
121+
if (string.IsNullOrEmpty(dataTypeName) || !dataTypeName.Contains(".ViewModels.", StringComparison.Ordinal))
122+
return;
123+
124+
var viewTypeName = dataTypeName.Replace(".ViewModels.", ".Views.");
125+
var viewType = Type.GetType(viewTypeName);
126+
if (viewType == null || !viewType.IsSubclassOf(typeof(Views.ChromelessWindow)))
127+
return;
128+
129+
window = Activator.CreateInstance(viewType) as Views.ChromelessWindow;
130+
if (window != null)
131+
{
132+
window.DataContext = data;
133+
if (showAsDialog && Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
134+
window.ShowDialog(owner);
135+
else
136+
window.Show();
137+
}
112138
}
113139

114140
public static void RaiseException(string context, string message)
@@ -342,6 +368,14 @@ public override void OnFrameworkInitializationCompleted()
342368
{
343369
BindingPlugins.DataValidators.RemoveAt(0);
344370

371+
// Disable tooltip if window is not active.
372+
ToolTip.ToolTipOpeningEvent.AddClassHandler<Control>((c, e) =>
373+
{
374+
var topLevel = TopLevel.GetTopLevel(c);
375+
if (topLevel is not Window { IsActive: true })
376+
e.Cancel = true;
377+
});
378+
345379
if (TryLaunchAsCoreEditor(desktop))
346380
return;
347381

@@ -445,7 +479,7 @@ private static bool TryLaunchAsRebaseMessageEditor(string[] args, out int exitCo
445479
if (!collection.Onto.Equals(onto) || !collection.OrigHead.Equals(origHead))
446480
return true;
447481

448-
var done = File.ReadAllText(doneFile).Trim().Split([ '\r', '\n' ], StringSplitOptions.RemoveEmptyEntries);
482+
var done = File.ReadAllText(doneFile).Trim().Split(['\r', '\n'], StringSplitOptions.RemoveEmptyEntries);
449483
if (done.Length == 0)
450484
return true;
451485

@@ -598,11 +632,7 @@ private void ShowSelfUpdateResult(object data)
598632
{
599633
Dispatcher.UIThread.Post(() =>
600634
{
601-
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
602-
{
603-
var dialog = new Views.SelfUpdate() { DataContext = new ViewModels.SelfUpdate() { Data = data } };
604-
dialog.ShowDialog(owner);
605-
}
635+
ShowWindow(new ViewModels.SelfUpdate() { Data = data }, true);
606636
});
607637
}
608638

src/Commands/Bisect.cs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace SourceGit.Commands
2+
{
3+
public class Bisect : Command
4+
{
5+
public Bisect(string repo, string subcmd)
6+
{
7+
WorkingDirectory = repo;
8+
Context = repo;
9+
RaiseError = false;
10+
Args = $"bisect {subcmd}";
11+
}
12+
}
13+
}

src/Commands/Diff.cs

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Text.RegularExpressions;
44

@@ -28,7 +28,9 @@ public Diff(string repo, Models.DiffOption opt, int unified, bool ignoreWhitespa
2828
Context = repo;
2929

3030
if (ignoreWhitespace)
31-
Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-cr-at-eol --ignore-all-space --unified={unified} {opt}";
31+
Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-all-space --unified={unified} {opt}";
32+
else if (Models.DiffOption.IgnoreCRAtEOL)
33+
Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --ignore-cr-at-eol --unified={unified} {opt}";
3234
else
3335
Args = $"-c core.autocrlf=false diff --no-ext-diff --patch --unified={unified} {opt}";
3436
}
@@ -103,7 +105,7 @@ private void ParseLine(string line)
103105
}
104106
else if (line.StartsWith("-size ", StringComparison.Ordinal))
105107
{
106-
_result.LFSDiff.Old.Size = long.Parse(line.Substring(6));
108+
_result.LFSDiff.Old.Size = long.Parse(line.AsSpan().Slice(6));
107109
}
108110
}
109111
else if (ch == '+')
@@ -114,12 +116,12 @@ private void ParseLine(string line)
114116
}
115117
else if (line.StartsWith("+size ", StringComparison.Ordinal))
116118
{
117-
_result.LFSDiff.New.Size = long.Parse(line.Substring(6));
119+
_result.LFSDiff.New.Size = long.Parse(line.AsSpan().Slice(6));
118120
}
119121
}
120122
else if (line.StartsWith(" size ", StringComparison.Ordinal))
121123
{
122-
_result.LFSDiff.New.Size = _result.LFSDiff.Old.Size = long.Parse(line.Substring(6));
124+
_result.LFSDiff.New.Size = _result.LFSDiff.Old.Size = long.Parse(line.AsSpan().Slice(6));
123125
}
124126
return;
125127
}

0 commit comments

Comments
 (0)