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 0e37e01

Browse files
Merge branch 'release/v8.43'
2 parents 4a3ef62 + e1fb799 commit 0e37e01

Some content is hidden

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

59 files changed

+1244
-337
lines changed

‎.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
with:
2626
version: ${{ needs.version.outputs.version }}
2727
publish-packages:
28+
needs: [package, version]
2829
name: Publish Packages
2930
uses: ./.github/workflows/publish-packages.yml
3031
secrets:

‎README.md

Lines changed: 28 additions & 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-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-99.58%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.86%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-97.03%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.45%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-98.87%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
50+
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-97.50%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.78%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-95.00%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-95.56%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-96.81%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-97.92%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
5151

5252
## How to Use
5353

@@ -98,6 +98,33 @@ For **macOS** users:
9898

9999
For **Linux** users:
100100

101+
* For Debian/Ubuntu based distributions, you can add the `sourcegit` repository by following:
102+
You may need to install curl and/or gpg first, if you're on a very minimal host:
103+
```shell
104+
apt update && apt install curl gpg -y
105+
```
106+
Install the registry signing key:
107+
```shell
108+
curl -fsSL "https://packages.buildkite.com/sourcegit/sourcegit-deb/gpgkey" | gpg --dearmor -o /etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg
109+
```
110+
Configure the source:
111+
```shell
112+
echo -e "deb [signed-by=/etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg] https://packages.buildkite.com/sourcegit/sourcegit-deb/any/ any main\ndeb-src [signed-by=/etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg] https://packages.buildkite.com/sourcegit/sourcegit-deb/any/ any main" > /etc/apt/sources.list.d/buildkite-sourcegit-sourcegit-deb.list
113+
```
114+
Update your local repository and install the package:
115+
```shell
116+
apt update && apt install sourcegit
117+
```
118+
* For RHEL/Fedora based distributions, you can add the `sourcegit` repository by following:
119+
Configure the source:
120+
```shell
121+
sudo sh -c 'echo -e "[sourcegit-rpm]\nname=sourcegit-rpm\nbaseurl=https://packages.buildkite.com/sourcegit/sourcegit-rpm/rpm_any/rpm_any/\$basearch\nenabled=1\nrepo_gpgcheck=1\ngpgcheck=0\ngpgkey=https://packages.buildkite.com/sourcegit/sourcegit-rpm/gpgkey\npriority=1"' > /etc/yum.repos.d/sourcegit-rpm.repo
122+
```
123+
Install the package with this command:
124+
```shell
125+
sudo dnf install -y sourcegit
126+
```
127+
* `Appimage` files can be found on [AppimageHub](https://appimage.github.io/SourceGit/)
101128
* `xdg-open` must be installed to support open native file manager.
102129
* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your linux.
103130
* Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI.

‎TRANSLATION.md

Lines changed: 95 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,81 @@
1-
### de_DE.axaml: 99.58%
1+
### de_DE.axaml: 97.50%
22

33

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

7+
- Text.BranchCM.MergeMultiBranches
8+
- Text.CommitCM.Merge
9+
- Text.CommitCM.MergeMultiple
710
- Text.CommitDetail.Files.Search
811
- Text.Diff.UseBlockNavigation
12+
- Text.FileCM.ResolveUsing
13+
- Text.Hotkeys.Global.Clone
14+
- Text.InProgress.CherryPick.Head
15+
- Text.InProgress.Merge.Operating
16+
- Text.InProgress.Rebase.StoppedAt
17+
- Text.InProgress.Revert.Head
18+
- Text.Merge.Source
19+
- Text.MergeMultiple
20+
- Text.MergeMultiple.CommitChanges
21+
- Text.MergeMultiple.Strategy
22+
- Text.MergeMultiple.Targets
23+
- Text.Repository.Skip
924
- Text.WorkingCopy.CommitToEdit
1025

1126
</details>
1227

13-
### es_ES.axaml: 99.86%
28+
### es_ES.axaml: 97.78%
1429

1530

1631
<details>
1732
<summary>Missing Keys</summary>
1833

34+
- Text.BranchCM.MergeMultiBranches
35+
- Text.CommitCM.Merge
36+
- Text.CommitCM.MergeMultiple
1937
- Text.Diff.UseBlockNavigation
38+
- Text.FileCM.ResolveUsing
39+
- Text.Hotkeys.Global.Clone
40+
- Text.InProgress.CherryPick.Head
41+
- Text.InProgress.Merge.Operating
42+
- Text.InProgress.Rebase.StoppedAt
43+
- Text.InProgress.Revert.Head
44+
- Text.Merge.Source
45+
- Text.MergeMultiple
46+
- Text.MergeMultiple.CommitChanges
47+
- Text.MergeMultiple.Strategy
48+
- Text.MergeMultiple.Targets
49+
- Text.Repository.Skip
2050

2151
</details>
2252

23-
### fr_FR.axaml: 97.03%
53+
### fr_FR.axaml: 95.00%
2454

2555

2656
<details>
2757
<summary>Missing Keys</summary>
2858

59+
- Text.BranchCM.MergeMultiBranches
2960
- Text.CherryPick.AppendSourceToMessage
3061
- Text.CherryPick.Mainline.Tips
3162
- Text.CommitCM.CherryPickMultiple
63+
- Text.CommitCM.Merge
64+
- Text.CommitCM.MergeMultiple
3265
- Text.CommitDetail.Files.Search
3366
- Text.Diff.UseBlockNavigation
3467
- Text.Fetch.Force
68+
- Text.FileCM.ResolveUsing
69+
- Text.Hotkeys.Global.Clone
70+
- Text.InProgress.CherryPick.Head
71+
- Text.InProgress.Merge.Operating
72+
- Text.InProgress.Rebase.StoppedAt
73+
- Text.InProgress.Revert.Head
74+
- Text.Merge.Source
75+
- Text.MergeMultiple
76+
- Text.MergeMultiple.CommitChanges
77+
- Text.MergeMultiple.Strategy
78+
- Text.MergeMultiple.Targets
3579
- Text.Preference.Appearance.FontSize
3680
- Text.Preference.Appearance.FontSize.Default
3781
- Text.Preference.Appearance.FontSize.Editor
@@ -44,25 +88,39 @@
4488
- Text.Repository.HistoriesOrder
4589
- Text.Repository.HistoriesOrder.ByDate
4690
- Text.Repository.HistoriesOrder.Topo
91+
- Text.Repository.Skip
4792
- Text.ScanRepositories
4893
- Text.SHALinkCM.NavigateTo
4994
- Text.WorkingCopy.CommitToEdit
5095

5196
</details>
5297

53-
### it_IT.axaml: 97.45%
98+
### it_IT.axaml: 95.56%
5499

55100

56101
<details>
57102
<summary>Missing Keys</summary>
58103

104+
- Text.BranchCM.MergeMultiBranches
105+
- Text.CommitCM.Merge
106+
- Text.CommitCM.MergeMultiple
59107
- Text.CommitDetail.Files.Search
60108
- Text.CommitDetail.Info.Children
61109
- Text.Configure.IssueTracker.AddSampleGitLabMergeRequest
62110
- Text.Configure.OpenAI.Preferred
63111
- Text.Configure.OpenAI.Preferred.Tip
64112
- Text.Diff.UseBlockNavigation
65113
- Text.Fetch.Force
114+
- Text.FileCM.ResolveUsing
115+
- Text.InProgress.CherryPick.Head
116+
- Text.InProgress.Merge.Operating
117+
- Text.InProgress.Rebase.StoppedAt
118+
- Text.InProgress.Revert.Head
119+
- Text.Merge.Source
120+
- Text.MergeMultiple
121+
- Text.MergeMultiple.CommitChanges
122+
- Text.MergeMultiple.Strategy
123+
- Text.MergeMultiple.Targets
66124
- Text.Preference.General.ShowChildren
67125
- Text.Repository.FilterCommits
68126
- Text.Repository.FilterCommits.Default
@@ -71,36 +129,66 @@
71129
- Text.Repository.HistoriesOrder
72130
- Text.Repository.HistoriesOrder.ByDate
73131
- Text.Repository.HistoriesOrder.Topo
132+
- Text.Repository.Skip
74133
- Text.SHALinkCM.CopySHA
75134
- Text.SHALinkCM.NavigateTo
76135
- Text.WorkingCopy.CommitToEdit
77136

78137
</details>
79138

80-
### pt_BR.axaml: 98.87%
139+
### pt_BR.axaml: 96.81%
81140

82141

83142
<details>
84143
<summary>Missing Keys</summary>
85144

145+
- Text.BranchCM.MergeMultiBranches
146+
- Text.CommitCM.Merge
147+
- Text.CommitCM.MergeMultiple
86148
- Text.CommitDetail.Files.Search
87149
- Text.CommitDetail.Info.Children
88150
- Text.Diff.UseBlockNavigation
89151
- Text.Fetch.Force
152+
- Text.FileCM.ResolveUsing
153+
- Text.Hotkeys.Global.Clone
154+
- Text.InProgress.CherryPick.Head
155+
- Text.InProgress.Merge.Operating
156+
- Text.InProgress.Rebase.StoppedAt
157+
- Text.InProgress.Revert.Head
158+
- Text.Merge.Source
159+
- Text.MergeMultiple
160+
- Text.MergeMultiple.CommitChanges
161+
- Text.MergeMultiple.Strategy
162+
- Text.MergeMultiple.Targets
90163
- Text.Preference.General.ShowChildren
91164
- Text.Repository.FilterCommits
165+
- Text.Repository.Skip
92166
- Text.SHALinkCM.NavigateTo
93167
- Text.WorkingCopy.CommitToEdit
94168

95169
</details>
96170

97-
### ru_RU.axaml: 100.00%
171+
### ru_RU.axaml: 97.92%
98172

99173

100174
<details>
101175
<summary>Missing Keys</summary>
102176

103-
177+
- Text.BranchCM.MergeMultiBranches
178+
- Text.CommitCM.Merge
179+
- Text.CommitCM.MergeMultiple
180+
- Text.FileCM.ResolveUsing
181+
- Text.Hotkeys.Global.Clone
182+
- Text.InProgress.CherryPick.Head
183+
- Text.InProgress.Merge.Operating
184+
- Text.InProgress.Rebase.StoppedAt
185+
- Text.InProgress.Revert.Head
186+
- Text.Merge.Source
187+
- Text.MergeMultiple
188+
- Text.MergeMultiple.CommitChanges
189+
- Text.MergeMultiple.Strategy
190+
- Text.MergeMultiple.Targets
191+
- Text.Repository.Skip
104192

105193
</details>
106194

‎VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.42
1+
8.43

‎src/Commands/Branch.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
{
33
public static class Branch
44
{
5+
public static string ShowCurrent(string repo)
6+
{
7+
var cmd = new Command();
8+
cmd.WorkingDirectory = repo;
9+
cmd.Context = repo;
10+
cmd.Args = $"branch --show-current";
11+
return cmd.ReadToEnd().StdOut.Trim();
12+
}
13+
514
public static bool Create(string repo, string name, string basedOn)
615
{
716
var cmd = new Command();

‎src/Commands/Command.cs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ public bool Exec()
7474
}
7575

7676
if (string.IsNullOrEmpty(e.Data))
77+
{
78+
errs.Add(string.Empty);
7779
return;
80+
}
81+
7882
if (TraitErrorAsOutput)
7983
OnReadline(e.Data);
8084

@@ -89,6 +93,7 @@ public bool Exec()
8993
return;
9094
if (REG_PROGRESS().IsMatch(e.Data))
9195
return;
96+
9297
errs.Add(e.Data);
9398
};
9499

@@ -99,12 +104,8 @@ public bool Exec()
99104
catch (Exception e)
100105
{
101106
if (RaiseError)
102-
{
103-
Dispatcher.UIThread.Invoke(() =>
104-
{
105-
App.RaiseException(Context, e.Message);
106-
});
107-
}
107+
Dispatcher.UIThread.Post(() => App.RaiseException(Context, e.Message));
108+
108109
return false;
109110
}
110111

@@ -115,15 +116,15 @@ public bool Exec()
115116
int exitCode = proc.ExitCode;
116117
proc.Close();
117118

118-
if (!isCancelled && exitCode != 0&&errs.Count>0)
119+
if (!isCancelled && exitCode != 0)
119120
{
120121
if (RaiseError)
121122
{
122-
Dispatcher.UIThread.Invoke(() =>
123-
{
124-
App.RaiseException(Context, string.Join("\n", errs));
125-
});
123+
var errMsg = string.Join("\n", errs);
124+
if (!string.IsNullOrWhiteSpace(errMsg))
125+
Dispatcher.UIThread.Post(() => App.RaiseException(Context, errMsg));
126126
}
127+
127128
return false;
128129
}
129130

‎src/Commands/Merge.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
24

35
namespace SourceGit.Commands
46
{
@@ -13,6 +15,29 @@ public Merge(string repo, string source, string mode, Action<string> outputHandl
1315
Args = $"merge --progress {source} {mode}";
1416
}
1517

18+
public Merge(string repo, List<string> targets, bool autoCommit, string strategy, Action<string> outputHandler)
19+
{
20+
_outputHandler = outputHandler;
21+
WorkingDirectory = repo;
22+
Context = repo;
23+
TraitErrorAsOutput = true;
24+
25+
var builder = new StringBuilder();
26+
builder.Append("merge --progress ");
27+
if (!string.IsNullOrEmpty(strategy))
28+
builder.Append($"--strategy={strategy} ");
29+
if (!autoCommit)
30+
builder.Append("--no-commit ");
31+
32+
foreach (var t in targets)
33+
{
34+
builder.Append(t);
35+
builder.Append(' ');
36+
}
37+
38+
Args = builder.ToString();
39+
}
40+
1641
protected override void OnReadline(string line)
1742
{
1843
_outputHandler?.Invoke(line);

‎src/Commands/QueryCommitsWithFullMessage.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,28 @@ public QueryCommitsWithFullMessage(string repo, string args)
5252
_current.Commit.CommitterTime = ulong.Parse(line);
5353
break;
5454
default:
55-
if (line.Equals(_boundary, StringComparison.Ordinal))
56-
nextPartIdx = -1;
55+
var boundary = rs.StdOut.IndexOf(_boundary, end + 1);
56+
if (boundary > end)
57+
{
58+
_current.Message = rs.StdOut.Substring(start, boundary - start - 1);
59+
end = boundary + _boundary.Length;
60+
}
5761
else
58-
_current.Message += line;
62+
{
63+
_current.Message = rs.StdOut.Substring(start);
64+
end = rs.StdOut.Length - 2;
65+
}
66+
67+
nextPartIdx = -1;
5968
break;
6069
}
6170

6271
nextPartIdx++;
6372

6473
start = end + 1;
74+
if (start >= rs.StdOut.Length - 1)
75+
break;
76+
6577
end = rs.StdOut.IndexOf('\n', start);
6678
}
6779

0 commit comments

Comments
(0)

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