Skip to content

Commit ed37b42

Browse files
committed
Merge branch 'release/v2025.05'
2 parents 7fc7c8f + d401e89 commit ed37b42

37 files changed

+606
-188
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
4848
## Translation Status
4949

50-
[![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-98.13%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-98.13%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-92.91%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-98.40%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-92.65%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-98.13%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen)](TRANSLATION.md)
50+
[![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-99.47%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.61%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-92.42%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.87%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-92.15%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-99.73%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen)](TRANSLATION.md)
5151

5252
> [!NOTE]
5353
> You can find the missing keys in [TRANSLATION.md](TRANSLATION.md)

TRANSLATION.md

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
1-
### de_DE.axaml: 98.13%
1+
### de_DE.axaml: 99.47%
22

33

44
<details>
55
<summary>Missing Keys</summary>
66

7-
- Text.AIAssistant.Regen
8-
- Text.AIAssistant.Use
9-
- Text.ApplyStash
10-
- Text.ApplyStash.DropAfterApply
11-
- Text.ApplyStash.RestoreIndex
12-
- Text.ApplyStash.Stash
13-
- Text.Clone.RecurseSubmodules
14-
- Text.CreateBranch.Name.WarnSpace
15-
- Text.DeleteRepositoryNode.Path
16-
- Text.DeleteRepositoryNode.TipForGroup
17-
- Text.DeleteRepositoryNode.TipForRepository
18-
- Text.Stash.AutoRestore
19-
- Text.Stash.AutoRestore.Tip
20-
- Text.WorkingCopy.SignOff
7+
- Text.BranchCM.CustomAction
8+
- Text.Configure.CustomAction.Scope.Branch
9+
- Text.Configure.CustomAction.WaitForExit
10+
- Text.Repository.Notifications.Clear
2111

2212
</details>
2313

24-
### es_ES.axaml: 98.13%
14+
### es_ES.axaml: 97.61%
2515

2616

2717
<details>
@@ -33,18 +23,22 @@
3323
- Text.ApplyStash.DropAfterApply
3424
- Text.ApplyStash.RestoreIndex
3525
- Text.ApplyStash.Stash
26+
- Text.BranchCM.CustomAction
3627
- Text.Clone.RecurseSubmodules
28+
- Text.Configure.CustomAction.Scope.Branch
29+
- Text.Configure.CustomAction.WaitForExit
3730
- Text.CreateBranch.Name.WarnSpace
3831
- Text.DeleteRepositoryNode.Path
3932
- Text.DeleteRepositoryNode.TipForGroup
4033
- Text.DeleteRepositoryNode.TipForRepository
34+
- Text.Repository.Notifications.Clear
4135
- Text.Stash.AutoRestore
4236
- Text.Stash.AutoRestore.Tip
4337
- Text.WorkingCopy.SignOff
4438

4539
</details>
4640

47-
### fr_FR.axaml: 92.91%
41+
### fr_FR.axaml: 92.42%
4842

4943

5044
<details>
@@ -56,7 +50,10 @@
5650
- Text.ApplyStash.DropAfterApply
5751
- Text.ApplyStash.RestoreIndex
5852
- Text.ApplyStash.Stash
53+
- Text.BranchCM.CustomAction
5954
- Text.Clone.RecurseSubmodules
55+
- Text.Configure.CustomAction.Scope.Branch
56+
- Text.Configure.CustomAction.WaitForExit
6057
- Text.CreateBranch.Name.WarnSpace
6158
- Text.DeleteRepositoryNode.Path
6259
- Text.DeleteRepositoryNode.TipForGroup
@@ -87,6 +84,7 @@
8784
- Text.Repository.HistoriesOrder
8885
- Text.Repository.HistoriesOrder.ByDate
8986
- Text.Repository.HistoriesOrder.Topo
87+
- Text.Repository.Notifications.Clear
9088
- Text.Repository.Skip
9189
- Text.Repository.Tags.OrderByCreatorDate
9290
- Text.Repository.Tags.OrderByNameAsc
@@ -106,7 +104,7 @@
106104

107105
</details>
108106

109-
### it_IT.axaml: 98.40%
107+
### it_IT.axaml: 97.87%
110108

111109

112110
<details>
@@ -118,16 +116,20 @@
118116
- Text.ApplyStash.DropAfterApply
119117
- Text.ApplyStash.RestoreIndex
120118
- Text.ApplyStash.Stash
119+
- Text.BranchCM.CustomAction
121120
- Text.Clone.RecurseSubmodules
121+
- Text.Configure.CustomAction.Scope.Branch
122+
- Text.Configure.CustomAction.WaitForExit
122123
- Text.DeleteRepositoryNode.Path
123124
- Text.DeleteRepositoryNode.TipForGroup
124125
- Text.DeleteRepositoryNode.TipForRepository
126+
- Text.Repository.Notifications.Clear
125127
- Text.Stash.AutoRestore
126128
- Text.Stash.AutoRestore.Tip
127129

128130
</details>
129131

130-
### pt_BR.axaml: 92.65%
132+
### pt_BR.axaml: 92.15%
131133

132134

133135
<details>
@@ -139,12 +141,15 @@
139141
- Text.ApplyStash.DropAfterApply
140142
- Text.ApplyStash.RestoreIndex
141143
- Text.ApplyStash.Stash
144+
- Text.BranchCM.CustomAction
142145
- Text.BranchCM.MergeMultiBranches
143146
- Text.Clone.RecurseSubmodules
144147
- Text.CommitCM.Merge
145148
- Text.CommitCM.MergeMultiple
146149
- Text.CommitDetail.Files.Search
147150
- Text.CommitDetail.Info.Children
151+
- Text.Configure.CustomAction.Scope.Branch
152+
- Text.Configure.CustomAction.WaitForExit
148153
- Text.Configure.IssueTracker.AddSampleGiteeIssue
149154
- Text.Configure.IssueTracker.AddSampleGiteePullRequest
150155
- Text.CreateBranch.Name.WarnSpace
@@ -172,6 +177,7 @@
172177
- Text.Repository.HistoriesLayout.Horizontal
173178
- Text.Repository.HistoriesLayout.Vertical
174179
- Text.Repository.HistoriesOrder
180+
- Text.Repository.Notifications.Clear
175181
- Text.Repository.OnlyHighlightCurrentBranchInHistories
176182
- Text.Repository.Skip
177183
- Text.Repository.Tags.OrderByCreatorDate
@@ -191,26 +197,14 @@
191197

192198
</details>
193199

194-
### ru_RU.axaml: 98.13%
200+
### ru_RU.axaml: 99.73%
195201

196202

197203
<details>
198204
<summary>Missing Keys</summary>
199205

200-
- Text.AIAssistant.Regen
201-
- Text.AIAssistant.Use
202-
- Text.ApplyStash
203-
- Text.ApplyStash.DropAfterApply
204-
- Text.ApplyStash.RestoreIndex
205-
- Text.ApplyStash.Stash
206-
- Text.Clone.RecurseSubmodules
207-
- Text.CreateBranch.Name.WarnSpace
208-
- Text.DeleteRepositoryNode.Path
209-
- Text.DeleteRepositoryNode.TipForGroup
210-
- Text.DeleteRepositoryNode.TipForRepository
211-
- Text.Stash.AutoRestore
212-
- Text.Stash.AutoRestore.Tip
213-
- Text.WorkingCopy.SignOff
206+
- Text.BranchCM.CustomAction
207+
- Text.Configure.CustomAction.Scope.Branch
214208

215209
</details>
216210

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.04
1+
2025.05

src/Commands/ExecuteCustomAction.cs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,37 @@ namespace SourceGit.Commands
88
{
99
public static class ExecuteCustomAction
1010
{
11-
public static void Run(string repo, string file, string args, Action<string> outputHandler)
11+
public static void Run(string repo, string file, string args)
12+
{
13+
var start = new ProcessStartInfo();
14+
start.FileName = file;
15+
start.Arguments = args;
16+
start.UseShellExecute = false;
17+
start.CreateNoWindow = true;
18+
start.WorkingDirectory = repo;
19+
20+
// Force using en_US.UTF-8 locale to avoid GCM crash
21+
if (OperatingSystem.IsLinux())
22+
start.Environment.Add("LANG", "en_US.UTF-8");
23+
24+
// Fix macOS `PATH` env
25+
if (OperatingSystem.IsMacOS() && !string.IsNullOrEmpty(Native.OS.CustomPathEnv))
26+
start.Environment.Add("PATH", Native.OS.CustomPathEnv);
27+
28+
try
29+
{
30+
Process.Start(start);
31+
}
32+
catch (Exception e)
33+
{
34+
Dispatcher.UIThread.Invoke(() =>
35+
{
36+
App.RaiseException(repo, e.Message);
37+
});
38+
}
39+
}
40+
41+
public static void RunAndWait(string repo, string file, string args, Action<string> outputHandler)
1242
{
1343
var start = new ProcessStartInfo();
1444
start.FileName = file;

src/Commands/Worktree.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.IO;
34

45
namespace SourceGit.Commands
56
{
@@ -26,6 +27,7 @@ public Worktree(string repo)
2627
if (line.StartsWith("worktree ", StringComparison.Ordinal))
2728
{
2829
last = new Models.Worktree() { FullPath = line.Substring(9).Trim() };
30+
last.RelativePath = Path.GetRelativePath(WorkingDirectory, last.FullPath);
2931
worktrees.Add(last);
3032
}
3133
else if (line.StartsWith("bare", StringComparison.Ordinal))

src/Models/CustomAction.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public enum CustomActionScope
66
{
77
Repository,
88
Commit,
9+
Branch,
910
}
1011

1112
public class CustomAction : ObservableObject
@@ -34,9 +35,16 @@ public string Arguments
3435
set => SetProperty(ref _arguments, value);
3536
}
3637

38+
public bool WaitForExit
39+
{
40+
get => _waitForExit;
41+
set => SetProperty(ref _waitForExit, value);
42+
}
43+
3744
private string _name = string.Empty;
3845
private CustomActionScope _scope = CustomActionScope.Repository;
3946
private string _executable = string.Empty;
4047
private string _arguments = string.Empty;
48+
private bool _waitForExit = true;
4149
}
4250
}

src/Models/Watcher.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ private void Tick(object sender)
114114
{
115115
_updateBranch = 0;
116116
_updateWC = 0;
117+
_updateSubmodules = 0;
117118

118119
if (_updateTags > 0)
119120
{
@@ -124,6 +125,7 @@ private void Tick(object sender)
124125
Task.Run(_repo.RefreshBranches);
125126
Task.Run(_repo.RefreshCommits);
126127
Task.Run(_repo.RefreshWorkingCopyChanges);
128+
Task.Run(_repo.RefreshSubmodules);
127129
Task.Run(_repo.RefreshWorktrees);
128130
}
129131

@@ -136,20 +138,20 @@ private void Tick(object sender)
136138
if (_updateSubmodules > 0 && now > _updateSubmodules)
137139
{
138140
_updateSubmodules = 0;
139-
_repo.RefreshSubmodules();
141+
Task.Run(_repo.RefreshSubmodules);
140142
}
141143

142144
if (_updateStashes > 0 && now > _updateStashes)
143145
{
144146
_updateStashes = 0;
145-
_repo.RefreshStashes();
147+
Task.Run(_repo.RefreshStashes);
146148
}
147149

148150
if (_updateTags > 0 && now > _updateTags)
149151
{
150152
_updateTags = 0;
151-
_repo.RefreshTags();
152-
_repo.RefreshCommits();
153+
Task.Run(_repo.RefreshTags);
154+
Task.Run(_repo.RefreshCommits);
153155
}
154156
}
155157

@@ -178,12 +180,6 @@ private void OnRepositoryChanged(object o, FileSystemEventArgs e)
178180
(name.StartsWith("worktrees/", StringComparison.Ordinal) && name.EndsWith("/HEAD", StringComparison.Ordinal)))
179181
{
180182
_updateBranch = DateTime.Now.AddSeconds(.5).ToFileTime();
181-
182-
lock (_lockSubmodule)
183-
{
184-
if (_submodules.Count > 0)
185-
_updateSubmodules = DateTime.Now.AddSeconds(1).ToFileTime();
186-
}
187183
}
188184
else if (name.StartsWith("objects/", StringComparison.Ordinal) || name.Equals("index", StringComparison.Ordinal))
189185
{

src/Models/Worktree.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public class Worktree : ObservableObject
66
{
77
public string Branch { get; set; } = string.Empty;
88
public string FullPath { get; set; } = string.Empty;
9+
public string RelativePath { get; set; } = string.Empty;
910
public string Head { get; set; } = string.Empty;
1011
public bool IsBare { get; set; } = false;
1112
public bool IsDetached { get; set; } = false;
@@ -21,15 +22,15 @@ public string Name
2122
get
2223
{
2324
if (IsDetached)
24-
return $"(deteched HEAD at {Head.Substring(10)})";
25+
return $"deteched HEAD at {Head.Substring(10)}";
2526

2627
if (Branch.StartsWith("refs/heads/", System.StringComparison.Ordinal))
27-
return $"({Branch.Substring(11)})";
28+
return Branch.Substring(11);
2829

2930
if (Branch.StartsWith("refs/remotes/", System.StringComparison.Ordinal))
30-
return $"({Branch.Substring(13)})";
31+
return Branch.Substring(13);
3132

32-
return $"({Branch})";
33+
return Branch;
3334
}
3435
}
3536

src/Resources/Icons.axaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
<StreamGeometry x:Key="Icons.Check">M512 597m-1 0a1 1 0 103 0a1 1 0 10-3 0ZM810 393 732 315 448 600 293 444 214 522l156 156 78 78 362-362z</StreamGeometry>
1111
<StreamGeometry x:Key="Icons.Changes">M747 467c29 0 56 4 82 12v-363c0-47-38-84-84-84H125c-47 0-84 38-84 84v707c0 47 38 84 84 84h375a287 287 0 01-43-152c0-160 129-289 289-289zm-531-250h438c19 0 34 15 34 34s-15 34-34 34H216c-19 0-34-15-34-34s15-34 34-34zm0 179h263c19 0 34 15 34 34s-15 34-34 34H216c-19 0-34-15-34-34s15-34 34-34zm131 247h-131c-19 0-34-15-34-34s15-34 34-34h131c19 0 34 15 34 34s-15 34-34 34zM747 521c-130 0-236 106-236 236S617 992 747 992s236-106 236-236S877 521 747 521zm11 386v-65h-130c-12 0-22-10-22-22s10-22 22-22h260l-130 108zm108-192H606l130-108v65h130c12 0 22 10 22 22s-10 22-22 22z</StreamGeometry>
1212
<StreamGeometry x:Key="Icons.CherryPick">M529 511c115 0 212 79 239 185h224a62 62 0 017 123l-7 0-224 0a247 247 0 01-479 0H65a62 62 0 01-7-123l7-0h224a247 247 0 01239-185zm0 124a124 124 0 100 247 124 124 0 000-247zm0-618c32 0 58 24 61 55l0 7V206c89 11 165 45 225 103a74 74 0 0122 45l0 9v87a62 62 0 01-123 7l-0-7v-65l-6-4c-43-33-97-51-163-53l-17-0c-74 0-133 18-180 54l-6 4v65a62 62 0 01-55 61l-7 0a62 62 0 01-61-55l-0-7V362c0-20 8-39 23-53 60-58 135-92 224-103V79c0-34 28-62 62-62z</StreamGeometry>
13+
<StreamGeometry x:Key="Icons.CircleDown">M512 926c-229 0-414-186-414-414S283 98 512 98s414 186 414 414-186 414-414 414zm0-73c189 0 341-153 341-341S701 171 512 171 171 323 171 512s153 341 341 341zm-6-192L284 439l52-52 171 171 171-171L728 439l-222 222z</StreamGeometry>
1314
<StreamGeometry x:Key="Icons.Clear">M512 57c251 0 455 204 455 455S763 967 512 967 57 763 57 512 261 57 512 57zm181 274c-11-11-29-11-40 0L512 472 371 331c-11-11-29-11-40 0-11 11-11 29 0 40L471 512 331 653c-11 11-11 29 0 40 11 11 29 11 40 0l141-141 141 141c11 11 29 11 40 0 11-11 11-29 0-40L552 512l141-141c11-11 11-29 0-40z</StreamGeometry>
15+
<StreamGeometry x:Key="Icons.ClearNotifications">M591 907A85 85 0 01427 875h114a299 299 0 0050 32zM725 405c130 0 235 105 235 235s-105 235-235 235-235-105-235-235 105-235 235-235zM512 64a43 43 0 0143 43v24c126 17 229 107 264 225A298 298 0 00725 341l-4 0A235 235 0 00512 213l-5 0c-125 4-224 104-228 229l-0 6v167a211 211 0 01-26 101l-4 7-14 23h211a298 298 0 0050 85l-276-0a77 77 0 01-66-39c-13-22-14-50-2-73l2-4 22-36c10-17 16-37 17-57l0-7v-167C193 287 313 153 469 131V107a43 43 0 0139-43zm345 505L654 771a149 149 0 00202-202zM725 491a149 149 0 00-131 220l202-202A149 149 0 00725 491z</StreamGeometry>
1416
<StreamGeometry x:Key="Icons.Clean">M797 829a49 49 0 1049 49 49 49 0 00-49-49zm147-114A49 49 0 10992 764a49 49 0 00-49-49zM928 861a49 49 0 1049 49A49 49 0 00928 861zm-5-586L992 205 851 64l-71 71a67 67 0 00-94 0l235 235a67 67 0 000-94zm-853 128a32 32 0 00-32 50 1291 1291 0 0075 112L288 552c20 0 25 21 8 37l-93 86a1282 1282 0 00120 114l100-32c19-6 28 15 14 34l-40 55c26 19 53 36 82 53a89 89 0 00115-20 1391 1391 0 00256-485l-188-188s-306 224-595 198z</StreamGeometry>
1517
<StreamGeometry x:Key="Icons.Clone">M1280 704c0 141-115 256-256 256H288C129 960 0 831 0 672c0-126 80-232 192-272A327 327 0 01192 384c0-177 143-320 320-320 119 0 222 64 277 160C820 204 857 192 896 192c106 0 192 86 192 192 0 24-5 48-13 69C1192 477 1280 580 1280 704zm-493-128H656V352c0-18-14-32-32-32h-96c-18 0-32 14-32 32v224h-131c-29 0-43 34-23 55l211 211c12 12 33 12 45 0l211-211c20-20 6-55-23-55z</StreamGeometry>
1618
<StreamGeometry x:Key="Icons.Code">M853 102H171C133 102 102 133 102 171v683C102 891 133 922 171 922h683C891 922 922 891 922 853V171C922 133 891 102 853 102zM390 600l-48 48L205 512l137-137 48 48L301 512l88 88zM465 819l-66-18L559 205l66 18L465 819zm218-171L634 600 723 512l-88-88 48-48L819 512 683 649z</StreamGeometry>

0 commit comments

Comments
 (0)