Skip to content

Commit f3adb25

Browse files
committed
Merge branch 'release/v8.44'
2 parents 0e37e01 + 9603f2b commit f3adb25

Some content is hidden

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

43 files changed

+639
-373
lines changed

README.md

Lines changed: 1 addition & 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-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)
50+
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-100.00%25-brightgreen)](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-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)
5151

5252
## How to Use
5353

TRANSLATION.md

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
1-
### de_DE.axaml: 97.50%
1+
### de_DE.axaml: 100.00%
22

33

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

7-
- Text.BranchCM.MergeMultiBranches
8-
- Text.CommitCM.Merge
9-
- Text.CommitCM.MergeMultiple
10-
- Text.CommitDetail.Files.Search
11-
- 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
24-
- Text.WorkingCopy.CommitToEdit
7+
258

269
</details>
2710

@@ -168,27 +151,13 @@
168151

169152
</details>
170153

171-
### ru_RU.axaml: 97.92%
154+
### ru_RU.axaml: 100.00%
172155

173156

174157
<details>
175158
<summary>Missing Keys</summary>
176159

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
160+
192161

193162
</details>
194163

VERSION

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

src/App.Commands.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ public Command(Action<object> action)
2525
private Action<object> _action = null;
2626
}
2727

28+
public static bool IsCheckForUpdateCommandVisible
29+
{
30+
get
31+
{
32+
#if DISABLE_UPDATE_DETECTION
33+
return false;
34+
#else
35+
return true;
36+
#endif
37+
}
38+
}
39+
2840
public static readonly Command OpenPreferenceCommand = new Command(_ => OpenDialog(new Views.Preference()));
2941
public static readonly Command OpenHotkeysCommand = new Command(_ => OpenDialog(new Views.Hotkeys()));
3042
public static readonly Command OpenAppDataDirCommand = new Command(_ => Native.OS.OpenInFileManager(Native.OS.DataDir));

src/App.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<NativeMenu>
3434
<NativeMenuItem Header="{DynamicResource Text.About.Menu}" Command="{x:Static s:App.OpenAboutCommand}"/>
3535
<NativeMenuItem Header="{DynamicResource Text.Hotkeys}" Command="{x:Static s:App.OpenHotkeysCommand}"/>
36-
<NativeMenuItem Header="{DynamicResource Text.SelfUpdate}" Command="{x:Static s:App.CheckForUpdateCommand}"/>
36+
<NativeMenuItem Header="{DynamicResource Text.SelfUpdate}" Command="{x:Static s:App.CheckForUpdateCommand}" IsVisible="{x:Static s:App.IsCheckForUpdateCommandVisible}"/>
3737
<NativeMenuItemSeparator/>
3838
<NativeMenuItem Header="{DynamicResource Text.Preference}" Command="{x:Static s:App.OpenPreferenceCommand}" Gesture="⌘+,"/>
3939
<NativeMenuItem Header="{DynamicResource Text.OpenAppDataDir}" Command="{x:Static s:App.OpenAppDataDirCommand}"/>

src/App.axaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,11 @@ private void TryLaunchedAsNormal(IClassicDesktopStyleApplicationLifetime desktop
548548
_launcher = new ViewModels.Launcher(startupRepo);
549549
desktop.MainWindow = new Views.Launcher() { DataContext = _launcher };
550550

551+
#if !DISABLE_UPDATE_DETECTION
551552
var pref = ViewModels.Preference.Instance;
552553
if (pref.ShouldCheck4UpdateOnStartup())
553554
Check4Update();
555+
#endif
554556
}
555557

556558
private ViewModels.Launcher _launcher = null;

src/Commands/Command.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ public bool Exec()
120120
{
121121
if (RaiseError)
122122
{
123-
var errMsg = string.Join("\n", errs);
124-
if (!string.IsNullOrWhiteSpace(errMsg))
123+
var errMsg = string.Join("\n", errs).Trim();
124+
if (!string.IsNullOrEmpty(errMsg))
125125
Dispatcher.UIThread.Post(() => App.RaiseException(Context, errMsg));
126126
}
127127

src/Commands/QueryCommits.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ namespace SourceGit.Commands
66
{
77
public class QueryCommits : Command
88
{
9-
public QueryCommits(string repo, bool useTopoOrder, string limits, bool needFindHead = true)
9+
public QueryCommits(string repo, string limits, bool needFindHead = true)
1010
{
11-
var order = useTopoOrder ? "--topo-order" : "--date-order";
12-
1311
WorkingDirectory = repo;
1412
Context = repo;
15-
Args = $"log {order} --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s {limits}";
13+
Args = $"log --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s {limits}";
1614
_findFirstMerged = needFindHead;
1715
}
1816

src/Commands/QueryRefsContainsCommit.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public QueryRefsContainsCommit(string repo, string commit)
2323
var lines = output.StdOut.Split('\n');
2424
foreach (var line in lines)
2525
{
26+
if (line.EndsWith("/HEAD", StringComparison.Ordinal))
27+
continue;
28+
2629
if (line.StartsWith("refs/heads/", StringComparison.Ordinal))
2730
rs.Add(new() { Name = line.Substring("refs/heads/".Length), Type = Models.DecoratorType.LocalBranchHead });
2831
else if (line.StartsWith("refs/remotes/", StringComparison.Ordinal))

src/Models/AvatarManager.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,24 @@ public static AvatarManager Instance
3535

3636
private static AvatarManager _instance = null;
3737

38-
[GeneratedRegex(@"^(?:(\d+)\+)?(.+?)@users\.noreply\.github\.com$")]
38+
[GeneratedRegex(@"^(?:(\d+)\+)?(.+?)@.+\.github\.com$")]
3939
private static partial Regex REG_GITHUB_USER_EMAIL();
4040

4141
private object _synclock = new object();
4242
private string _storePath;
4343
private List<IAvatarHost> _avatars = new List<IAvatarHost>();
4444
private Dictionary<string, Bitmap> _resources = new Dictionary<string, Bitmap>();
4545
private HashSet<string> _requesting = new HashSet<string>();
46+
private HashSet<string> _defaultAvatars = new HashSet<string>();
4647

4748
public void Start()
4849
{
4950
_storePath = Path.Combine(Native.OS.DataDir, "avatars");
5051
if (!Directory.Exists(_storePath))
5152
Directory.CreateDirectory(_storePath);
5253

53-
var icon = AssetLoader.Open(new Uri($"avares://SourceGit/Resources/Images/github.png", UriKind.RelativeOrAbsolute));
54-
_resources.Add("noreply@github.com", new Bitmap(icon));
54+
LoadDefaultAvatar("noreply@github.com", "github.png");
55+
LoadDefaultAvatar("unrealbot@epicgames.com", "unreal.png");
5556

5657
Task.Run(() =>
5758
{
@@ -140,7 +141,7 @@ public Bitmap Request(string email, bool forceRefetch)
140141
{
141142
if (forceRefetch)
142143
{
143-
if (email.Equals("[email protected]", StringComparison.Ordinal))
144+
if (_defaultAvatars.Contains(email))
144145
return null;
145146

146147
if (_resources.ContainsKey(email))
@@ -185,6 +186,13 @@ public Bitmap Request(string email, bool forceRefetch)
185186
return null;
186187
}
187188

189+
private void LoadDefaultAvatar(string key, string img)
190+
{
191+
var icon = AssetLoader.Open(new Uri($"avares://SourceGit/Resources/Images/{img}", UriKind.RelativeOrAbsolute));
192+
_resources.Add(key, new Bitmap(icon));
193+
_defaultAvatars.Add(key);
194+
}
195+
188196
private string GetEmailHash(string email)
189197
{
190198
var lowered = email.ToLower(CultureInfo.CurrentCulture).Trim();

0 commit comments

Comments
 (0)