From a036d650e59dae80dbe7142866dcfb11a151a768 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 30 Jul 2026 10:22:05 +0800 Subject: [PATCH 01/11] fix: crash due to name of pipeline too long (#2576) Signed-off-by: leo --- src/Models/IpcChannel.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Models/IpcChannel.cs b/src/Models/IpcChannel.cs index 4e9fc0b162..86c8167aea 100644 --- a/src/Models/IpcChannel.cs +++ b/src/Models/IpcChannel.cs @@ -71,10 +71,15 @@ public void Dispose() private static string GetPipeName() { + // SourceGit does not support multiple instances on macOS, so we can use a fixed pipe name for macOS. + if (OperatingSystem.IsMacOS()) + return "SourceGit"; + + // Windows and Linux can have multiple instances of SourceGit running (portable-mode), so we need to generate a unique pipe name based on the data directory. var dataDir = Native.OS.DataDir.Replace('\\', '/').TrimEnd('/'); - var hash = SHA256.HashData(Encoding.UTF8.GetBytes(dataDir)); - var hashStr = Convert.ToHexString(hash)[..16]; - return $"SourceGitIPCChannel{Environment.UserName}_{hashStr}"; + var hashStr = $"{Environment.UserName}_{dataDir}"; + var hash = Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(hashStr))).Substring(0, 10); + return $"SG_{hash}"; } private async void StartServer() From edcf91485c6d87d14af50bd1264e2f199671c9ff Mon Sep 17 00:00:00 2001 From: weiningwei Date: Thu, 30 Jul 2026 10:34:48 +0800 Subject: [PATCH 02/11] fix(add-worktree): exclude current branch and branches with existing worktree (#2581) Signed-off-by: weiningwei --- src/ViewModels/AddWorktree.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ViewModels/AddWorktree.cs b/src/ViewModels/AddWorktree.cs index dcdfc718cf..8f8aea2c40 100644 --- a/src/ViewModels/AddWorktree.cs +++ b/src/ViewModels/AddWorktree.cs @@ -80,9 +80,14 @@ public AddWorktree(Repository repo) foreach (var branch in repo.Branches) { if (branch.IsLocal) - LocalBranches.Add(branch); + { + if (!branch.IsCurrent && !branch.HasWorktree) + LocalBranches.Add(branch); + } else + { RemoteBranches.Add(branch); + } } } From 467d550b25a92334eaf4d57146208a32830b20a1 Mon Sep 17 00:00:00 2001 From: Mark Shi Date: Thu, 30 Jul 2026 10:35:15 +0800 Subject: [PATCH 03/11] docs: Update README.md with new linux instructions (#2577) Signed-off-by: LiarOnce --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 2bf6c6968b..38a7e99fa2 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,14 @@ For **Linux** users: sudo apt install sourcegit ``` +* `AOSC OS`: In addition to AMD64 and ARM64, support for LoongArch and RISC-V has been added. + ```shell + sudo oma install sourcegit + ``` + +> [!NOTE] +> RISC-V support is untested. + * `AppImage` files can be found on [AppImage hub](https://appimage.github.io/SourceGit/), `xdg-open` (`xdg-utils`) must be installed to support open native file manager. * Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) or [git-credential-libsecret](https://pkgs.org/search/?q=git-credential-libsecret) 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. From d907a7a1fe55c9a2abb9f1ac98e682c88c055edd Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 30 Jul 2026 11:03:28 +0800 Subject: [PATCH 04/11] refactor: use `--rebase=false` when pulling with `Use rebase instead of merge` unchecked (#2582) Signed-off-by: leo --- src/Commands/Pull.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Commands/Pull.cs b/src/Commands/Pull.cs index e121445bac..75b433e73c 100644 --- a/src/Commands/Pull.cs +++ b/src/Commands/Pull.cs @@ -13,10 +13,13 @@ public Pull(string repo, string remote, string branch, bool useRebase) Context = repo; var builder = new StringBuilder(512); - builder.Append("pull --verbose --progress "); - if (useRebase) - builder.Append("--rebase=true "); - builder.Append(remote).Append(' ').Append(branch); + builder + .Append("pull --verbose --progress --rebase=") + .Append(useRebase ? "true" : "false") + .Append(' ') + .Append(remote) + .Append(' ') + .Append(branch); Args = builder.ToString(); } From 3a2a4e0448cb1086fe946e937ec4990486042da0 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 30 Jul 2026 12:28:40 +0800 Subject: [PATCH 05/11] feature: change the `FontFamily` of commit message editor to monospace font and show column guide length indicator (80 chars) (#2586) (#2587) Signed-off-by: leo --- src/Views/CommitMessageToolBox.axaml | 42 +++---- src/Views/CommitMessageToolBox.axaml.cs | 142 ++++++++++-------------- 2 files changed, 70 insertions(+), 114 deletions(-) diff --git a/src/Views/CommitMessageToolBox.axaml b/src/Views/CommitMessageToolBox.axaml index 63fc0f6f51..cdc801e7c9 100644 --- a/src/Views/CommitMessageToolBox.axaml +++ b/src/Views/CommitMessageToolBox.axaml @@ -13,19 +13,25 @@ BorderBrush="{DynamicResource Brush.Border2}" CornerRadius="4"> - + - - + GuideLineBrush="{DynamicResource Brush.Border2}" + FontFamily="{DynamicResource Fonts.Monospace}"> + + + + + - + - - + + + + + - - + + + + +