Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7f5c7ad

Browse files
Merge branch 'release/v2025.29'
2 parents 4b5b702 + 0834889 commit 7f5c7ad

29 files changed

+204
-200
lines changed

‎.github/workflows/package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
name: sourcegit.${{ matrix.runtime }}
2323
path: build/SourceGit
2424
- name: Package
25-
shell: bash
25+
shell: pwsh
2626
env:
2727
VERSION: ${{ inputs.version }}
2828
RUNTIME: ${{ matrix.runtime }}
29-
run: ./build/scripts/package.windows.sh
29+
run: ./build/scripts/package.win.ps1
3030
- name: Upload package artifact
3131
uses: actions/upload-artifact@v4
3232
with:

‎TRANSLATION.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ This document shows the translation status of each locale file in the repository
88

99
### ![de__DE](https://img.shields.io/badge/de__DE-%E2%88%9A-brightgreen)
1010

11-
### ![es__ES](https://img.shields.io/badge/es__ES-99.88%25-yellow)
11+
### ![es__ES](https://img.shields.io/badge/es__ES-99.77%25-yellow)
1212

1313
<details>
1414
<summary>Missing keys in es_ES.axaml</summary>
1515

1616
- Text.Configure.IssueTracker.AddSampleGerritChangeIdCommit
17+
- Text.Submodule.CopyBranch
1718

1819
</details>
1920

20-
### ![fr__FR](https://img.shields.io/badge/fr__FR-82.04%25-yellow)
21+
### ![fr__FR](https://img.shields.io/badge/fr__FR-81.95%25-yellow)
2122

2223
<details>
2324
<summary>Missing keys in fr_FR.axaml</summary>
@@ -147,6 +148,7 @@ This document shows the translation status of each locale file in the repository
147148
- Text.Stash.Mode
148149
- Text.StashCM.CopyMessage
149150
- Text.Submodule.Branch
151+
- Text.Submodule.CopyBranch
150152
- Text.Submodule.Deinit
151153
- Text.Submodule.Histories
152154
- Text.Submodule.Move
@@ -178,7 +180,7 @@ This document shows the translation status of each locale file in the repository
178180

179181
</details>
180182

181-
### ![it__IT](https://img.shields.io/badge/it__IT-87.32%25-yellow)
183+
### ![it__IT](https://img.shields.io/badge/it__IT-87.22%25-yellow)
182184

183185
<details>
184186
<summary>Missing keys in it_IT.axaml</summary>
@@ -280,6 +282,7 @@ This document shows the translation status of each locale file in the repository
280282
- Text.Stash.Mode
281283
- Text.StashCM.CopyMessage
282284
- Text.Submodule.Branch
285+
- Text.Submodule.CopyBranch
283286
- Text.Submodule.Deinit
284287
- Text.Submodule.Histories
285288
- Text.Submodule.Move
@@ -294,7 +297,7 @@ This document shows the translation status of each locale file in the repository
294297

295298
</details>
296299

297-
### ![ja__JP](https://img.shields.io/badge/ja__JP-82.04%25-yellow)
300+
### ![ja__JP](https://img.shields.io/badge/ja__JP-81.95%25-yellow)
298301

299302
<details>
300303
<summary>Missing keys in ja_JP.axaml</summary>
@@ -426,6 +429,7 @@ This document shows the translation status of each locale file in the repository
426429
- Text.Stash.Mode
427430
- Text.StashCM.CopyMessage
428431
- Text.Submodule.Branch
432+
- Text.Submodule.CopyBranch
429433
- Text.Submodule.Deinit
430434
- Text.Submodule.Histories
431435
- Text.Submodule.Move
@@ -455,7 +459,7 @@ This document shows the translation status of each locale file in the repository
455459

456460
</details>
457461

458-
### ![pt__BR](https://img.shields.io/badge/pt__BR-75.00%25-yellow)
462+
### ![pt__BR](https://img.shields.io/badge/pt__BR-74.91%25-red)
459463

460464
<details>
461465
<summary>Missing keys in pt_BR.axaml</summary>
@@ -645,6 +649,7 @@ This document shows the translation status of each locale file in the repository
645649
- Text.StashCM.CopyMessage
646650
- Text.StashCM.SaveAsPatch
647651
- Text.Submodule.Branch
652+
- Text.Submodule.CopyBranch
648653
- Text.Submodule.Deinit
649654
- Text.Submodule.Histories
650655
- Text.Submodule.Move
@@ -678,7 +683,7 @@ This document shows the translation status of each locale file in the repository
678683

679684
### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen)
680685

681-
### ![ta__IN](https://img.shields.io/badge/ta__IN-82.16%25-yellow)
686+
### ![ta__IN](https://img.shields.io/badge/ta__IN-82.06%25-yellow)
682687

683688
<details>
684689
<summary>Missing keys in ta_IN.axaml</summary>
@@ -809,6 +814,7 @@ This document shows the translation status of each locale file in the repository
809814
- Text.Stash.Mode
810815
- Text.StashCM.CopyMessage
811816
- Text.Submodule.Branch
817+
- Text.Submodule.CopyBranch
812818
- Text.Submodule.Deinit
813819
- Text.Submodule.Histories
814820
- Text.Submodule.Move
@@ -838,7 +844,7 @@ This document shows the translation status of each locale file in the repository
838844

839845
</details>
840846

841-
### ![uk__UA](https://img.shields.io/badge/uk__UA-83.33%25-yellow)
847+
### ![uk__UA](https://img.shields.io/badge/uk__UA-83.24%25-yellow)
842848

843849
<details>
844850
<summary>Missing keys in uk_UA.axaml</summary>
@@ -964,6 +970,7 @@ This document shows the translation status of each locale file in the repository
964970
- Text.Stash.Mode
965971
- Text.StashCM.CopyMessage
966972
- Text.Submodule.Branch
973+
- Text.Submodule.CopyBranch
967974
- Text.Submodule.Deinit
968975
- Text.Submodule.Histories
969976
- Text.Submodule.Move

‎VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.28
1+
2025.29

‎build/scripts/package.win.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove-Item -Path build\SourceGit\*.pdb -Force
2+
Compress-Archive -Path build\SourceGit -DestinationPath "build\sourcegit_${env:VERSION}.${env:RUNTIME}.zip" -Force

‎build/scripts/package.windows.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎src/Commands/DiffTool.cs

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,36 @@
1-
using System.IO;
2-
3-
namespace SourceGit.Commands
1+
namespace SourceGit.Commands
42
{
53
public class DiffTool : Command
64
{
7-
public DiffTool(string repo, inttype,stringexec,Models.DiffOption option)
5+
public DiffTool(string repo, Models.DiffOption option)
86
{
97
WorkingDirectory = repo;
108
Context = repo;
11-
12-
_merger = Models.ExternalMerger.Supported.Find(x => x.Type == type);
13-
_exec = exec;
149
_option = option;
1510
}
1611

1712
public void Open()
1813
{
19-
if (_merger == null)
14+
var tool = Native.OS.GetDiffMergeTool(true);
15+
if (tool == null)
2016
{
2117
App.RaiseException(Context, "Invalid merge tool in preference setting!");
2218
return;
2319
}
2420

25-
if (_merger.Type==0)
21+
if (string.IsNullOrEmpty(tool.Cmd))
2622
{
2723
Args = $"difftool -g --no-prompt {_option}";
2824
}
29-
else if (File.Exists(_exec))
30-
{
31-
var cmd = $"{_exec.Quoted()} {_merger.DiffCmd}";
32-
Args = $"-c difftool.sourcegit.cmd={cmd.Quoted()} difftool --tool=sourcegit --no-prompt {_option}";
33-
}
3425
else
3526
{
36-
App.RaiseException(Context,$"Can NOT find external diff tool in '{_exec}'!");
37-
return;
27+
varcmd=$"{tool.Exec.Quoted()}{tool.Cmd}";
28+
Args=$"-c difftool.sourcegit.cmd={cmd.Quoted()} difftool --tool=sourcegit --no-prompt {_option}";
3829
}
3930

4031
Exec();
4132
}
4233

43-
private Models.ExternalMerger _merger;
44-
private string _exec;
4534
private Models.DiffOption _option;
4635
}
4736
}

‎src/Commands/MergeTool.cs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,38 @@
1-
using System.IO;
2-
using System.Threading.Tasks;
1+
using System.Threading.Tasks;
32

43
namespace SourceGit.Commands
54
{
65
public class MergeTool : Command
76
{
8-
public MergeTool(string repo, inttype,stringexec,string file)
7+
public MergeTool(string repo, string file)
98
{
109
WorkingDirectory = repo;
11-
Context = exec;
12-
13-
_merger = Models.ExternalMerger.Supported.Find(x => x.Type == type);
14-
_exec = exec;
10+
Context = repo;
1511
_file = string.IsNullOrEmpty(file) ? string.Empty : file.Quoted();
1612
}
1713

1814
public async Task<bool> OpenAsync()
1915
{
20-
if (_merger == null)
16+
var tool = Native.OS.GetDiffMergeTool(false);
17+
if (tool == null)
2118
{
2219
App.RaiseException(Context, "Invalid merge tool in preference setting!");
2320
return false;
2421
}
2522

26-
if (_merger.Type==0)
23+
if (string.IsNullOrEmpty(tool.Cmd))
2724
{
2825
Args = $"mergetool {_file}";
2926
}
30-
else if (File.Exists(_exec))
31-
{
32-
var cmd = $"{_exec.Quoted()} {_merger.Cmd}";
33-
Args = $"-c mergetool.sourcegit.cmd={cmd.Quoted()} -c mergetool.writeToTemp=true -c mergetool.keepBackup=false -c mergetool.trustExitCode=true mergetool --tool=sourcegit {_file}";
34-
}
3527
else
3628
{
37-
App.RaiseException(Context,$"Can NOT find external merge tool in '{_exec}'!");
38-
returnfalse;
29+
varcmd=$"{tool.Exec.Quoted()}{tool.Cmd}";
30+
Args=$"-c mergetool.sourcegit.cmd={cmd.Quoted()} -c mergetool.writeToTemp=true -c mergetool.keepBackup=false -c mergetool.trustExitCode=true mergetool --tool=sourcegit {_file}";
3931
}
4032

4133
return await ExecAsync().ConfigureAwait(false);
4234
}
4335

44-
private Models.ExternalMerger _merger;
45-
private string _exec;
4636
private string _file;
4737
}
4838
}

‎src/Models/CommitLink.cs

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,29 @@ public static List<CommitLink> Get(List<Remote> remotes)
2020

2121
foreach (var remote in remotes)
2222
{
23-
if (remote.TryGetVisitURL(out var url))
23+
if (remote.TryGetVisitURL(out var link))
2424
{
25-
var trimmedUrl = url.AsSpan();
26-
if (url.EndsWith(".git"))
27-
trimmedUrl = url.AsSpan(0, url.Length - 4);
25+
if (link.EndsWith(".git"))
26+
link = link.Substring(0, link.Length - 4);
2827

29-
if (url.StartsWith("https://github.com/", StringComparison.Ordinal))
30-
outs.Add(new($"GitHub ({trimmedUrl[19..]})", $"{url}/commit/"));
31-
else if (url.StartsWith("https://gitlab.", StringComparison.Ordinal))
32-
outs.Add(new($"GitLab ({trimmedUrl[(trimmedUrl[15..].IndexOf('/') + 16)..]})", $"{url}/-/commit/"));
33-
else if (url.StartsWith("https://gitee.com/", StringComparison.Ordinal))
34-
outs.Add(new($"Gitee ({trimmedUrl[18..]})", $"{url}/commit/"));
35-
else if (url.StartsWith("https://bitbucket.org/", StringComparison.Ordinal))
36-
outs.Add(new($"BitBucket ({trimmedUrl[22..]})", $"{url}/commits/"));
37-
else if (url.StartsWith("https://codeberg.org/", StringComparison.Ordinal))
38-
outs.Add(new($"Codeberg ({trimmedUrl[21..]})", $"{url}/commit/"));
39-
else if (url.StartsWith("https://gitea.org/", StringComparison.Ordinal))
40-
outs.Add(new($"Gitea ({trimmedUrl[18..]})", $"{url}/commit/"));
41-
else if (url.StartsWith("https://git.sr.ht/", StringComparison.Ordinal))
42-
outs.Add(new($"sourcehut ({trimmedUrl[18..]})", $"{url}/commit/"));
28+
var uri = new Uri(link, UriKind.Absolute);
29+
var host = uri.Host;
30+
var route = uri.AbsolutePath.TrimStart('/');
31+
32+
if (host.Equals("github.com", StringComparison.Ordinal))
33+
outs.Add(new($"GitHub ({route})", $"{link}/commit/"));
34+
else if (host.Contains("gitlab", StringComparison.Ordinal))
35+
outs.Add(new($"GitLab ({route})", $"{link}/-/commit/"));
36+
else if (host.Equals("gitee.com", StringComparison.Ordinal))
37+
outs.Add(new($"Gitee ({route})", $"{link}/commit/"));
38+
else if (host.Equals("bitbucket.org", StringComparison.Ordinal))
39+
outs.Add(new($"BitBucket ({route})", $"{link}/commits/"));
40+
else if (host.Equals("codeberg.org", StringComparison.Ordinal))
41+
outs.Add(new($"Codeberg ({route})", $"{link}/commit/"));
42+
else if (host.Equals("gitea.org", StringComparison.Ordinal))
43+
outs.Add(new($"Gitea ({route})", $"{link}/commit/"));
44+
else if (host.Equals("git.sr.ht", StringComparison.Ordinal))
45+
outs.Add(new($"sourcehut ({route})", $"{link}/commit/"));
4346
}
4447
}
4548

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /