Skip to content

Commit

Permalink
Merge branch 'release/v8.43'
Browse files Browse the repository at this point in the history
  • Loading branch information
love-linger committed Dec 16, 2024
2 parents 4a3ef62 + e1fb799 commit 0e37e01
Show file tree
Hide file tree
Showing 59 changed files with 1,244 additions and 337 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
with:
version: ${{ needs.version.outputs.version }}
publish-packages:
needs: [package, version]
name: Publish Packages
uses: ./.github/workflows/publish-packages.yml
secrets:
Expand Down
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
## Translation Status

[![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)
[![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)

## How to Use

Expand Down Expand Up @@ -98,6 +98,33 @@ For **macOS** users:

For **Linux** users:

* For Debian/Ubuntu based distributions, you can add the `sourcegit` repository by following:
You may need to install curl and/or gpg first, if you're on a very minimal host:
```shell
apt update && apt install curl gpg -y
```
Install the registry signing key:
```shell
curl -fsSL "https://packages.buildkite.com/sourcegit/sourcegit-deb/gpgkey" | gpg --dearmor -o /etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg
```
Configure the source:
```shell
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
```
Update your local repository and install the package:
```shell
apt update && apt install sourcegit
```
* For RHEL/Fedora based distributions, you can add the `sourcegit` repository by following:
Configure the source:
```shell
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
```
Install the package with this command:
```shell
sudo dnf install -y sourcegit
```
* `Appimage` files can be found on [AppimageHub](https://appimage.github.io/SourceGit/)
* `xdg-open` must be installed to support open native file manager.
* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your linux.
* Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI.
Expand Down
102 changes: 95 additions & 7 deletions TRANSLATION.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,81 @@
### de_DE.axaml: 99.58%
### de_DE.axaml: 97.50%


<details>
<summary>Missing Keys</summary>

- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.Diff.UseBlockNavigation
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip
- Text.WorkingCopy.CommitToEdit

</details>

### es_ES.axaml: 99.86%
### es_ES.axaml: 97.78%


<details>
<summary>Missing Keys</summary>

- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.Diff.UseBlockNavigation
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip

</details>

### fr_FR.axaml: 97.03%
### fr_FR.axaml: 95.00%


<details>
<summary>Missing Keys</summary>

- Text.BranchCM.MergeMultiBranches
- Text.CherryPick.AppendSourceToMessage
- Text.CherryPick.Mainline.Tips
- Text.CommitCM.CherryPickMultiple
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Preference.Appearance.FontSize
- Text.Preference.Appearance.FontSize.Default
- Text.Preference.Appearance.FontSize.Editor
Expand All @@ -44,25 +88,39 @@
- Text.Repository.HistoriesOrder
- Text.Repository.HistoriesOrder.ByDate
- Text.Repository.HistoriesOrder.Topo
- Text.Repository.Skip
- Text.ScanRepositories
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit

</details>

### it_IT.axaml: 97.45%
### it_IT.axaml: 95.56%


<details>
<summary>Missing Keys</summary>

- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.CommitDetail.Info.Children
- Text.Configure.IssueTracker.AddSampleGitLabMergeRequest
- Text.Configure.OpenAI.Preferred
- Text.Configure.OpenAI.Preferred.Tip
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Preference.General.ShowChildren
- Text.Repository.FilterCommits
- Text.Repository.FilterCommits.Default
Expand All @@ -71,36 +129,66 @@
- Text.Repository.HistoriesOrder
- Text.Repository.HistoriesOrder.ByDate
- Text.Repository.HistoriesOrder.Topo
- Text.Repository.Skip
- Text.SHALinkCM.CopySHA
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit

</details>

### pt_BR.axaml: 98.87%
### pt_BR.axaml: 96.81%


<details>
<summary>Missing Keys</summary>

- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.CommitDetail.Info.Children
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Preference.General.ShowChildren
- Text.Repository.FilterCommits
- Text.Repository.Skip
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit

</details>

### ru_RU.axaml: 100.00%
### ru_RU.axaml: 97.92%


<details>
<summary>Missing Keys</summary>


- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip

</details>

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.42
8.43
9 changes: 9 additions & 0 deletions src/Commands/Branch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
{
public static class Branch
{
public static string ShowCurrent(string repo)
{
var cmd = new Command();
cmd.WorkingDirectory = repo;
cmd.Context = repo;
cmd.Args = $"branch --show-current";
return cmd.ReadToEnd().StdOut.Trim();
}

public static bool Create(string repo, string name, string basedOn)
{
var cmd = new Command();
Expand Down
23 changes: 12 additions & 11 deletions src/Commands/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ public bool Exec()
}

if (string.IsNullOrEmpty(e.Data))
{
errs.Add(string.Empty);
return;
}

if (TraitErrorAsOutput)
OnReadline(e.Data);

Expand All @@ -89,6 +93,7 @@ public bool Exec()
return;
if (REG_PROGRESS().IsMatch(e.Data))
return;

errs.Add(e.Data);
};

Expand All @@ -99,12 +104,8 @@ public bool Exec()
catch (Exception e)
{
if (RaiseError)
{
Dispatcher.UIThread.Invoke(() =>
{
App.RaiseException(Context, e.Message);
});
}
Dispatcher.UIThread.Post(() => App.RaiseException(Context, e.Message));

return false;
}

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

if (!isCancelled && exitCode != 0 && errs.Count > 0)
if (!isCancelled && exitCode != 0)
{
if (RaiseError)
{
Dispatcher.UIThread.Invoke(() =>
{
App.RaiseException(Context, string.Join("\n", errs));
});
var errMsg = string.Join("\n", errs);
if (!string.IsNullOrWhiteSpace(errMsg))
Dispatcher.UIThread.Post(() => App.RaiseException(Context, errMsg));
}

return false;
}

Expand Down
25 changes: 25 additions & 0 deletions src/Commands/Merge.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;

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

public Merge(string repo, List<string> targets, bool autoCommit, string strategy, Action<string> outputHandler)
{
_outputHandler = outputHandler;
WorkingDirectory = repo;
Context = repo;
TraitErrorAsOutput = true;

var builder = new StringBuilder();
builder.Append("merge --progress ");
if (!string.IsNullOrEmpty(strategy))
builder.Append($"--strategy={strategy} ");
if (!autoCommit)
builder.Append("--no-commit ");

foreach (var t in targets)
{
builder.Append(t);
builder.Append(' ');
}

Args = builder.ToString();
}

protected override void OnReadline(string line)
{
_outputHandler?.Invoke(line);
Expand Down
18 changes: 15 additions & 3 deletions src/Commands/QueryCommitsWithFullMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,28 @@ public QueryCommitsWithFullMessage(string repo, string args)
_current.Commit.CommitterTime = ulong.Parse(line);
break;
default:
if (line.Equals(_boundary, StringComparison.Ordinal))
nextPartIdx = -1;
var boundary = rs.StdOut.IndexOf(_boundary, end + 1);
if (boundary > end)
{
_current.Message = rs.StdOut.Substring(start, boundary - start - 1);
end = boundary + _boundary.Length;
}
else
_current.Message += line;
{
_current.Message = rs.StdOut.Substring(start);
end = rs.StdOut.Length - 2;
}

nextPartIdx = -1;
break;
}

nextPartIdx++;

start = end + 1;
if (start >= rs.StdOut.Length - 1)
break;

end = rs.StdOut.IndexOf('\n', start);
}

Expand Down
Loading

0 comments on commit 0e37e01

Please sign in to comment.