Skip to content

Commit 41dfbb3

Browse files
committed
Merge branch 'hotfix/v8.22.1'
2 parents a123586 + 75dcd16 commit 41dfbb3

16 files changed

+65
-71
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.22
1+
8.22.1

src/App.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ private void TryLaunchedAsNormal(IClassicDesktopStyleApplicationLifetime desktop
520520
desktop.MainWindow = new Views.Launcher() { DataContext = _launcher };
521521

522522
var pref = ViewModels.Preference.Instance;
523-
if (pref.ShouldCheck4UpdateOnStartup)
523+
if (pref.ShouldCheck4UpdateOnStartup())
524524
{
525525
pref.Save();
526526
Check4Update();

src/Commands/Command.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public bool Exec()
5858

5959
// If an SSH private key was provided, sets the environment.
6060
if (!string.IsNullOrEmpty(SSHKey))
61-
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -i '{SSHKey}'");
61+
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -o StrictHostKeyChecking=accept-new -i '{SSHKey}'");
6262
else
6363
start.Arguments += "-c credential.helper=manager ";
6464

src/Commands/QueryBranches.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected override void OnReadline(string line)
7373
branch.IsCurrent = parts[2] == "*";
7474
branch.Upstream = parts[3];
7575

76-
if (branch.IsLocal && !parts[4].Equals("=", StringComparison.Ordinal))
76+
if (branch.IsLocal && !string.IsNullOrEmpty(parts[4]) && !parts[4].Equals("=", StringComparison.Ordinal))
7777
_needQueryTrackStatus.Add(branch);
7878
else
7979
branch.TrackStatus = new Models.BranchTrackStatus();

src/ViewModels/Clone.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public override Task<bool> Sure()
130130
CallUIThread(() =>
131131
{
132132
var normalizedPath = path.Replace("\\", "/");
133-
var node = Preference.FindOrAddNodeByRepositoryPath(normalizedPath, null, true);
133+
var node = Preference.Instance.FindOrAddNodeByRepositoryPath(normalizedPath, null, true);
134134
_launcher.OpenRepositoryInTab(node, _page);
135135
});
136136

src/ViewModels/CreateGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public CreateGroup(RepositoryNode parent)
2121

2222
public override Task<bool> Sure()
2323
{
24-
Preference.AddNode(new RepositoryNode()
24+
Preference.Instance.AddNode(new RepositoryNode()
2525
{
2626
Id = Guid.NewGuid().ToString(),
2727
Name = _name,

src/ViewModels/DeleteRepositoryNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public DeleteRepositoryNode(RepositoryNode node)
1818

1919
public override Task<bool> Sure()
2020
{
21-
Preference.RemoveNode(_node);
21+
Preference.Instance.RemoveNode(_node);
2222
return null;
2323
}
2424

src/ViewModels/EditRepositoryNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public override Task<bool> Sure()
4848
_node.Bookmark = _bookmark;
4949

5050
if (needSort)
51-
Preference.SortByRenamedNode(_node);
51+
Preference.Instance.SortByRenamedNode(_node);
5252

5353
return null;
5454
}

src/ViewModels/Init.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public override Task<bool> Sure()
3131
CallUIThread(() =>
3232
{
3333
var normalizedPath = _targetPath.Replace("\\", "/");
34-
Preference.FindOrAddNodeByRepositoryPath(normalizedPath, _parentNode, true);
34+
Preference.Instance.FindOrAddNodeByRepositoryPath(normalizedPath, _parentNode, true);
3535
});
3636

3737
return true;

src/ViewModels/Launcher.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
using System;
22
using System.IO;
33

4-
using Avalonia;
54
using Avalonia.Collections;
65
using Avalonia.Controls;
76
using Avalonia.Input;
8-
using Avalonia.Media;
97

108
using CommunityToolkit.Mvvm.ComponentModel;
119

@@ -34,6 +32,7 @@ public Launcher(string startupRepo)
3432
Pages = new AvaloniaList<LauncherPage>();
3533
AddNewTab();
3634

35+
var pref = Preference.Instance;
3736
if (!string.IsNullOrEmpty(startupRepo))
3837
{
3938
var root = new Commands.QueryRepositoryRootPath(startupRepo).Result();
@@ -48,14 +47,14 @@ public Launcher(string startupRepo)
4847
}
4948

5049
var normalized = root.Replace("\\", "/");
51-
var node = Preference.FindOrAddNodeByRepositoryPath(normalized, null, false);
50+
var node = pref.FindOrAddNodeByRepositoryPath(normalized, null, false);
5251
OpenRepositoryInTab(node, null);
5352
}
54-
else if (Preference.Instance.RestoreTabs)
53+
else if (pref.RestoreTabs)
5554
{
56-
foreach (var id in Preference.Instance.OpenedTabs)
55+
foreach (var id in pref.OpenedTabs)
5756
{
58-
var node = Preference.FindNode(id);
57+
var node = pref.FindNode(id);
5958
if (node == null)
6059
{
6160
node = new RepositoryNode()
@@ -70,7 +69,7 @@ public Launcher(string startupRepo)
7069
OpenRepositoryInTab(node, null);
7170
}
7271

73-
var lastActiveIdx = Preference.Instance.LastActiveTabIdx;
72+
var lastActiveIdx = pref.LastActiveTabIdx;
7473
if (lastActiveIdx >= 0 && lastActiveIdx < Pages.Count)
7574
ActivePage = Pages[lastActiveIdx];
7675
}

0 commit comments

Comments
 (0)