Skip to content

Commit 7149a8d

Browse files
committed
Merge branch 'release/v2026.15'
2 parents 8b1b6b2 + 8f75493 commit 7149a8d

121 files changed

Lines changed: 717 additions & 551 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.user
77
*.suo
88
*.code-workspace
9+
*.tss
910

1011
.DS_Store
1112
.DocumentRevisions-V100

TRANSLATION.md

Lines changed: 5 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -116,63 +116,9 @@ This document shows the translation status of each locale file in the repository
116116

117117
</details>
118118

119-
### ![el__GR](https://img.shields.io/badge/el__GR-97.05%25-yellow)
119+
### ![el__GR](https://img.shields.io/badge/el__GR-%E2%88%9A-brightgreen)
120120

121-
<details>
122-
<summary>Missing keys in el_GR.axaml</summary>
123-
124-
- Text.Apply.Source
125-
- Text.Apply.Source.File
126-
- Text.Apply.Source.Clipboard
127-
- Text.Bisect.WaitingForCheckoutAnother
128-
- Text.Bisect.WaitingForFirstBad
129-
- Text.CheckoutDetached
130-
- Text.CheckoutDetached.Target
131-
- Text.CheckoutDetached.Warning
132-
- Text.Configure.Git.EnableRecursiveWhenAutoUpdatingSubmodules
133-
- Text.CopyAsPatch
134-
- Text.DeleteBranch.AskForRemote
135-
- Text.DeleteBranch.Force
136-
- Text.Diff.EmptyFile
137-
- Text.FileModeChange
138-
- Text.FileModeChange.Deleted
139-
- Text.FileModeChange.Directory
140-
- Text.FileModeChange.Executable
141-
- Text.FileModeChange.New
142-
- Text.FileModeChange.Normal
143-
- Text.FileModeChange.Submodule
144-
- Text.FileModeChange.Symlink
145-
- Text.FileModeChange.Unknown
146-
- Text.GitFlow.Finish
147-
- Text.GitFlow.FinishWithRebase
148-
- Text.GitFlow.StartAt
149-
- Text.GitFlow.StartName
150-
- Text.TagCM.Checkout
151-
- Text.TagCM.Merge
152-
- Text.UpdateSubmodules.Recursive
153-
- Text.WorkingCopy.AddToGitIgnore.UntrackedInSameFolder
154-
155-
</details>
156-
157-
### ![es__ES](https://img.shields.io/badge/es__ES-98.82%25-yellow)
158-
159-
<details>
160-
<summary>Missing keys in es_ES.axaml</summary>
161-
162-
- Text.DeleteBranch.AskForRemote
163-
- Text.DeleteBranch.Force
164-
- Text.FileModeChange
165-
- Text.FileModeChange.Deleted
166-
- Text.FileModeChange.Directory
167-
- Text.FileModeChange.Executable
168-
- Text.FileModeChange.New
169-
- Text.FileModeChange.Normal
170-
- Text.FileModeChange.Submodule
171-
- Text.FileModeChange.Symlink
172-
- Text.FileModeChange.Unknown
173-
- Text.WorkingCopy.AddToGitIgnore.UntrackedInSameFolder
174-
175-
</details>
121+
### ![es__ES](https://img.shields.io/badge/es__ES-%E2%88%9A-brightgreen)
176122

177123
### ![fr__FR](https://img.shields.io/badge/fr__FR-95.97%25-yellow)
178124

@@ -990,25 +936,7 @@ This document shows the translation status of each locale file in the repository
990936

991937
</details>
992938

993-
### ![ru__RU](https://img.shields.io/badge/ru__RU-98.82%25-yellow)
994-
995-
<details>
996-
<summary>Missing keys in ru_RU.axaml</summary>
997-
998-
- Text.DeleteBranch.AskForRemote
999-
- Text.DeleteBranch.Force
1000-
- Text.FileModeChange
1001-
- Text.FileModeChange.Deleted
1002-
- Text.FileModeChange.Directory
1003-
- Text.FileModeChange.Executable
1004-
- Text.FileModeChange.New
1005-
- Text.FileModeChange.Normal
1006-
- Text.FileModeChange.Submodule
1007-
- Text.FileModeChange.Symlink
1008-
- Text.FileModeChange.Unknown
1009-
- Text.WorkingCopy.AddToGitIgnore.UntrackedInSameFolder
1010-
1011-
</details>
939+
### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen)
1012940

1013941
### ![ta__IN](https://img.shields.io/badge/ta__IN-64.83%25-red)
1014942

@@ -1734,20 +1662,6 @@ This document shows the translation status of each locale file in the repository
17341662

17351663
</details>
17361664

1737-
### ![zh__CN](https://img.shields.io/badge/zh__CN-99.90%25-yellow)
1738-
1739-
<details>
1740-
<summary>Missing keys in zh_CN.axaml</summary>
1741-
1742-
- Text.DeleteBranch.AskForRemote
1743-
1744-
</details>
1745-
1746-
### ![zh__TW](https://img.shields.io/badge/zh__TW-99.90%25-yellow)
1747-
1748-
<details>
1749-
<summary>Missing keys in zh_TW.axaml</summary>
1750-
1751-
- Text.DeleteBranch.AskForRemote
1665+
### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen)
17521666

1753-
</details>
1667+
### ![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2026.14
1+
2026.15

src/App.Extensions.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ public static string Escaped(this string value)
1818
return value.Replace("\"", "\\\"", StringComparison.Ordinal);
1919
}
2020

21+
public static string EscapeForBRE(this string value)
22+
{
23+
return value
24+
.Replace("\\", "\\\\", StringComparison.Ordinal)
25+
.Replace(".", "\\.", StringComparison.Ordinal)
26+
.Replace("[", "\\[", StringComparison.Ordinal)
27+
.Replace("*", "\\*", StringComparison.Ordinal)
28+
.Replace("^", "\\^", StringComparison.Ordinal)
29+
.Replace("$", "\\$", StringComparison.Ordinal)
30+
.Replace("{", "\\{", StringComparison.Ordinal);
31+
}
32+
2133
public static string FormatFontNames(string input)
2234
{
2335
if (string.IsNullOrEmpty(input))

src/Commands/Diff.cs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public partial class Diff : Command
3333
private const string SPECIAL_DIFF_START = "diff ";
3434
private const string SPECIAL_BINARY = "Binary files ";
3535
private const string SPECIAL_NO_NEWLINE = " No newline at end of file";
36+
private const string SPECIAL_SUBMODULE = "Subproject commit ";
3637

3738
public Diff(string repo, Models.DiffOption opt, int numContextLines, bool ignoreWhitespace, bool ignoreCRAtEOL)
3839
{
@@ -92,7 +93,7 @@ public Diff(string repo, Models.DiffOption opt, int numContextLines, bool ignore
9293
// Ignore exceptions.
9394
}
9495

95-
if (_result.IsBinary || _result.IsLFS || _result.TextDiff.Lines.Count == 0)
96+
if (_isLFS || _result.IsBinary || _result.TextDiff.Lines.Count == 0)
9697
{
9798
_result.TextDiff = null;
9899
}
@@ -104,6 +105,28 @@ public Diff(string repo, Models.DiffOption opt, int numContextLines, bool ignore
104105
_isInChunk = false;
105106
}
106107

108+
if (_result.TextDiff.Lines.Count < 4)
109+
{
110+
var isSubmoduleChange = true;
111+
112+
for (int i = 1; i < _result.TextDiff.Lines.Count; i++)
113+
{
114+
var line = _result.TextDiff.Lines[i];
115+
if (!line.Content.StartsWith(SPECIAL_SUBMODULE, StringComparison.Ordinal))
116+
{
117+
isSubmoduleChange = false;
118+
break;
119+
}
120+
}
121+
122+
if (isSubmoduleChange)
123+
{
124+
_result.IsSubmoduleChange = true;
125+
_result.TextDiff = null;
126+
return _result;
127+
}
128+
}
129+
107130
_result.TextDiff.MaxLineNumber = Math.Max(_newLine, _oldLine);
108131
_result.TextDiff.OldMode = _result.OldMode;
109132
_result.TextDiff.NewMode = _result.NewMode;
@@ -254,7 +277,7 @@ private bool ParseFileModeChange(string line)
254277

255278
private bool ParseLFSChange(char prefix, string content)
256279
{
257-
if (_result.IsLFS)
280+
if (_isLFS)
258281
{
259282
if (prefix == PREFIX_DELETED)
260283
{
@@ -284,7 +307,7 @@ private bool ParseLFSChange(char prefix, string content)
284307
{
285308
if (content.StartsWith(LFS_SPECIFIER, StringComparison.Ordinal))
286309
{
287-
_result.IsLFS = true;
310+
_isLFS = true;
288311
_result.LFSDiff = new Models.LFSDiff();
289312
return true;
290313
}
@@ -340,5 +363,6 @@ private void ProcessInlineHighlights()
340363
private int _oldLine = 0;
341364
private int _newLine = 0;
342365
private bool _isInChunk = false;
366+
private bool _isLFS = false;
343367
}
344368
}

src/Commands/InteractiveRebase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public InteractiveRebase(string repo, string basedOn, bool autoStash, bool noVer
1111
Editor = EditorType.RebaseEditor;
1212

1313
var builder = new StringBuilder(512);
14-
builder.Append("-c core.commentChar=± rebase -i --autosquash ");
14+
builder.Append("-c core.commentChar=\"^\" -c core.commentString=\"±\" rebase -i --autosquash ");
1515
if (autoStash)
1616
builder.Append("--autostash ");
1717
if (noVerify)
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
4+
namespace SourceGit.Commands
5+
{
6+
public class QuerySubmoduleRevision : Command
7+
{
8+
public QuerySubmoduleRevision(string repo, string revision)
9+
{
10+
WorkingDirectory = repo;
11+
Context = repo;
12+
13+
if (revision.EndsWith("-dirty", StringComparison.Ordinal))
14+
{
15+
_hasUncommittedChange = true;
16+
_revision = revision.Substring(0, revision.Length - 6);
17+
}
18+
else
19+
{
20+
_hasUncommittedChange = false;
21+
_revision = revision;
22+
}
23+
}
24+
25+
public async Task<Models.RevisionSubmodule> GetResultAsync()
26+
{
27+
Args = $"show --no-show-signature --decorate=full --format=%H%x00%P%x00%D%x00%aN±%aE%x00%at%x00%cN±%cE%x00%ct%x00%s%x00%B -s {_revision}";
28+
29+
var rs = await ReadToEndAsync().ConfigureAwait(false);
30+
if (!rs.IsSuccess || string.IsNullOrEmpty(rs.StdOut))
31+
return null;
32+
33+
var commit = new Models.Commit();
34+
var lines = rs.StdOut.Split('\0');
35+
if (lines.Length < 9)
36+
return null;
37+
38+
commit.SHA = lines[0];
39+
if (!string.IsNullOrEmpty(lines[1]))
40+
commit.Parents.AddRange(lines[1].Split(' ', StringSplitOptions.RemoveEmptyEntries));
41+
if (!string.IsNullOrEmpty(lines[2]))
42+
commit.ParseDecorators(lines[2]);
43+
commit.Author = Models.User.FindOrAdd(lines[3]);
44+
commit.AuthorTime = ulong.Parse(lines[4]);
45+
commit.Committer = Models.User.FindOrAdd(lines[5]);
46+
commit.CommitterTime = ulong.Parse(lines[6]);
47+
commit.Subject = lines[7];
48+
49+
var message = new Models.CommitFullMessage() { Message = lines[8].TrimEnd() };
50+
var uncommittedChangesCount = 0;
51+
if (_hasUncommittedChange)
52+
uncommittedChangesCount = await new CountLocalChanges(WorkingDirectory, true)
53+
.GetResultAsync()
54+
.ConfigureAwait(false);
55+
56+
return new Models.RevisionSubmodule()
57+
{
58+
Commit = commit,
59+
FullMessage = message,
60+
UncommittedChanges = uncommittedChangesCount
61+
};
62+
}
63+
64+
private bool _hasUncommittedChange = false;
65+
private string _revision = string.Empty;
66+
}
67+
}

src/Commands/Rebase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public Rebase(string repo, string basedOn, bool autoStash, bool noVerify)
1010
Context = repo;
1111

1212
var builder = new StringBuilder(512);
13-
builder.Append("-c core.commentChar=± rebase ");
13+
builder.Append("-c core.commentChar=\"^\" -c core.commentString=\"±\" rebase ");
1414
if (autoStash)
1515
builder.Append("--autostash ");
1616
if (noVerify)

src/Models/DiffResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public class SubmoduleDiff
101101
public class DiffResult
102102
{
103103
public bool IsBinary { get; set; } = false;
104-
public bool IsLFS { get; set; } = false;
104+
public bool IsSubmoduleChange { get; set; } = false;
105105
public string OldHash { get; set; } = string.Empty;
106106
public string NewHash { get; set; } = string.Empty;
107107
public int OldMode { get; set; } = 0;

0 commit comments

Comments
 (0)