Skip to content

Commit 7f68b9c

Browse files
committed
Merge branch 'release/v2026.17'
2 parents 0e5a456 + 342ccbb commit 7f68b9c

13 files changed

Lines changed: 129 additions & 138 deletions

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ For **Linux** users:
163163
sudo apt install sourcegit
164164
```
165165

166+
* `AOSC OS`: In addition to AMD64 and ARM64, support for LoongArch and RISC-V has been added.
167+
```shell
168+
sudo oma install sourcegit
169+
```
170+
171+
> [!NOTE]
172+
> RISC-V support is untested.
173+
166174
* `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.
167175
* 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.
168176
* Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2026.16
1+
2026.17

src/Commands/Pull.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ public Pull(string repo, string remote, string branch, bool useRebase)
1313
Context = repo;
1414

1515
var builder = new StringBuilder(512);
16-
builder.Append("pull --verbose --progress ");
17-
if (useRebase)
18-
builder.Append("--rebase=true ");
19-
builder.Append(remote).Append(' ').Append(branch);
16+
builder
17+
.Append("pull --verbose --progress --rebase=")
18+
.Append(useRebase ? "true" : "false")
19+
.Append(' ')
20+
.Append(remote)
21+
.Append(' ')
22+
.Append(branch);
2023

2124
Args = builder.ToString();
2225
}

src/Commands/QueryConflictFileState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public QueryConflictFileState(string repo, Models.Change change)
1212

1313
WorkingDirectory = repo;
1414
Context = repo;
15-
Args = $"diff --no-color --no-ext-diff --full-index --patch {opt}";
15+
Args = $"diff --no-color --no-ext-diff --no-textconv --full-index --patch {opt}";
1616
}
1717

1818
public async Task<Models.ConflictFileState> GetResultAsync()

src/Models/IpcChannel.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,15 @@ public void Dispose()
7171

7272
private static string GetPipeName()
7373
{
74+
// SourceGit does not support multiple instances on macOS, so we can use a fixed pipe name for macOS.
75+
if (OperatingSystem.IsMacOS())
76+
return "SourceGit";
77+
78+
// 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.
7479
var dataDir = Native.OS.DataDir.Replace('\\', '/').TrimEnd('/');
75-
var hash = SHA256.HashData(Encoding.UTF8.GetBytes(dataDir));
76-
var hashStr = Convert.ToHexString(hash)[..16];
77-
return $"SourceGitIPCChannel{Environment.UserName}_{hashStr}";
80+
var hashStr = $"{Environment.UserName}_{dataDir}";
81+
var hash = Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(hashStr))).Substring(0, 10);
82+
return $"SG_{hash}";
7883
}
7984

8085
private async void StartServer()

src/ViewModels/AddRemote.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ public string SSHKey
4444
set => SetProperty(ref _sshkey, value, true);
4545
}
4646

47+
public bool FetchWithoutTags
48+
{
49+
get;
50+
set;
51+
} = false;
52+
4753
public AddRemote(Repository repo)
4854
{
4955
_repo = repo;
@@ -105,7 +111,7 @@ public override async Task<bool> Sure()
105111
.Use(log)
106112
.SetAsync($"remote.{_name}.sshkey", _useSSH ? SSHKey : null);
107113

108-
await new Commands.Fetch(_repo.FullPath, _name, false, false)
114+
await new Commands.Fetch(_repo.FullPath, _name, FetchWithoutTags, false)
109115
.Use(log)
110116
.RunAsync();
111117
}

src/ViewModels/AddWorktree.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,14 @@ public AddWorktree(Repository repo)
8080
foreach (var branch in repo.Branches)
8181
{
8282
if (branch.IsLocal)
83-
LocalBranches.Add(branch);
83+
{
84+
if (!branch.IsCurrent && !branch.HasWorktree)
85+
LocalBranches.Add(branch);
86+
}
8487
else
88+
{
8589
RemoteBranches.Add(branch);
90+
}
8691
}
8792
}
8893

src/Views/AddRemote.axaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
Text="{DynamicResource Text.Remote.AddTitle}"/>
2020
</StackPanel>
2121

22-
<Grid Margin="0,16,0,0" RowDefinitions="32,32,Auto" ColumnDefinitions="120,*">
22+
<Grid Margin="0,16,0,0" RowDefinitions="32,32,Auto,32" ColumnDefinitions="120,*">
2323
<TextBlock Grid.Row="0" Grid.Column="0"
2424
HorizontalAlignment="Right" VerticalAlignment="Center"
2525
Margin="0,0,8,0"
@@ -85,6 +85,10 @@
8585
</TextBox.InnerRightContent>
8686
</TextBox>
8787
</Border>
88+
89+
<CheckBox Grid.Row="3" Grid.Column="1"
90+
Content="{DynamicResource Text.Fetch.NoTags}"
91+
IsChecked="{Binding FetchWithoutTags, Mode=TwoWay}"/>
8892
</Grid>
8993
</StackPanel>
9094
</UserControl>

src/Views/Blame.axaml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:m="using:SourceGit.Models"
56
xmlns:vm="using:SourceGit.ViewModels"
67
xmlns:v="using:SourceGit.Views"
78
xmlns:c="using:SourceGit.Converters"
@@ -111,17 +112,23 @@
111112
</Button>
112113

113114
<Border Grid.Column="3" Padding="6,0" Margin="0,2" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}" Background="#20000000">
114-
<Grid ColumnDefinitions="Auto,*">
115-
<TextBlock Grid.Column="0"
116-
FontWeight="Bold"
117-
Margin="0,0,6,0"
118-
FontFamily="{DynamicResource Fonts.Monospace}"
119-
Text="{Binding Revision.SHA, Converter={x:Static c:StringConverters.ToShortSHA}, Mode=OneWay}"/>
115+
<ContentControl Content="{Binding Revision, Mode=OneWay}">
116+
<ContentControl.DataTemplates>
117+
<DataTemplate DataType="m:Commit">
118+
<Grid ColumnDefinitions="Auto,*">
119+
<TextBlock Grid.Column="0"
120+
FontWeight="Bold"
121+
Margin="0,0,6,0"
122+
FontFamily="{DynamicResource Fonts.Monospace}"
123+
Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}, Mode=OneWay}"/>
120124

121-
<TextBlock Grid.Column="1"
122-
Text="{Binding Revision.Subject}"
123-
TextTrimming="CharacterEllipsis"/>
124-
</Grid>
125+
<TextBlock Grid.Column="1"
126+
Text="{Binding Subject}"
127+
TextTrimming="CharacterEllipsis"/>
128+
</Grid>
129+
</DataTemplate>
130+
</ContentControl.DataTemplates>
131+
</ContentControl>
125132
</Border>
126133

127134
<Button Grid.Column="4"

src/Views/CommitMessageToolBox.axaml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,22 @@
1313
BorderBrush="{DynamicResource Brush.Border2}"
1414
CornerRadius="4">
1515
<Grid RowDefinitions="*,24">
16-
<Grid Grid.Row="0">
16+
<Grid Grid.Row="0">
1717
<v:CommitMessageTextBox x:Name="Editor"
18-
Classes="no_border"
18+
Classes="no_border no_background"
1919
CornerRadius="4,4,0,0"
2020
Background="Transparent"
2121
Text="{Binding #ThisControl.CommitMessage, Mode=TwoWay}"
2222
Watermark="{DynamicResource Text.CommitMessageTextBox.Placeholder}"
2323
SubjectGuideLength="{Binding Source={x:Static vm:Preferences.Instance}, Path=SubjectGuideLength, Mode=OneWay}"
24-
FontSize="{Binding Source={x:Static vm:Preferences.Instance}, Path=EditorFontSize, Mode=OneWay}"/>
25-
26-
<v:CommitMessageSubjectEndIndicator LineBrush="{DynamicResource Brush.Border2}"
27-
FontFamily="{DynamicResource Fonts.Default}"
28-
SubjectEndY="{Binding #Editor.SubjectEndY, Mode=OneWay}"/>
24+
GuideLineBrush="{DynamicResource Brush.Border2}"
25+
FontFamily="{DynamicResource Fonts.Monospace}">
26+
<v:CommitMessageTextBox.Styles>
27+
<Style Selector="ContentPresenter">
28+
<Setter Property="FontFamily" Value="{DynamicResource Fonts.Monospace}"/>
29+
</Style>
30+
</v:CommitMessageTextBox.Styles>
31+
</v:CommitMessageTextBox>
2932

3033
<Popup PlacementTarget="{Binding #Editor, Mode=OneWay}"
3134
Placement="AnchorAndGravity"
@@ -85,7 +88,7 @@
8588
BorderThickness="0,1,0,0"
8689
BorderBrush="{DynamicResource Brush.Border2}"
8790
CornerRadius="0,0,4,4">
88-
<Grid ColumnDefinitions="Auto,Auto,Auto,*" >
91+
<Grid ColumnDefinitions="Auto,Auto,Auto,*">
8992
<Button Grid.Column="0"
9093
Classes="icon_button"
9194
Width="28"
@@ -119,26 +122,6 @@
119122
Margin="0,0,6,0"
120123
HorizontalAlignment="Right" VerticalAlignment="Stretch"
121124
Orientation="Horizontal">
122-
<Rectangle Width=".5"
123-
Margin="8,0"
124-
Fill="{DynamicResource Brush.Border2}"
125-
HorizontalAlignment="Center"
126-
VerticalAlignment="Stretch"/>
127-
128-
<TextBlock Classes="info_label"
129-
FontSize="13"
130-
HorizontalAlignment="Left"
131-
Text="{DynamicResource Text.CommitMessageTextBox.Column}"/>
132-
<TextBlock Margin="8,0,0,0"
133-
FontSize="11"
134-
Text="{Binding #Editor.Column, Mode=OneWay}"/>
135-
136-
<Rectangle Width=".5"
137-
Margin="8,0"
138-
Fill="{DynamicResource Brush.Border2}"
139-
HorizontalAlignment="Center"
140-
VerticalAlignment="Stretch"/>
141-
142125
<TextBlock Classes="info_label"
143126
FontSize="13"
144127
HorizontalAlignment="Left"

0 commit comments

Comments
 (0)