|
2 | 2 | using System.Diagnostics.CodeAnalysis; |
3 | 3 | using System.IO; |
4 | 4 | using System.Windows; |
5 | | -using System.Windows.Threading; |
6 | 5 | using BananaGit.EventArgExtensions; |
7 | 6 | using BananaGit.Exceptions; |
8 | 7 | using BananaGit.Models; |
@@ -48,7 +47,7 @@ public GitService(GitInfoModel? gitInfo) |
48 | 47 | // Attach this service to the current branch after it's been loaded |
49 | 48 | _gitInfo?.CurrentBranch?.AttachService(this); |
50 | 49 |
|
51 | | - _defaultBranchName = Lib2GitSharpExt.GetDefaultRepoName(_gitInfo?.GetUrl()); |
| 50 | + _defaultBranchName = Lib2GitSharpExt.GetDefaultRepoName(_gitInfo?.GetUrl(), _gitInfo?.PersonalToken); |
52 | 51 | } |
53 | 52 |
|
54 | 53 | private bool _hasUserInfoReloaded; |
@@ -570,7 +569,7 @@ await Task.Run(() => |
570 | 569 | MarkBranchVisible(localName); |
571 | 570 | }); |
572 | 571 | OnRepositoryChanged?.Invoke(this, EventArgs.Empty); |
573 | | - _defaultBranchName = Lib2GitSharpExt.GetDefaultRepoName(_gitInfo?.GetUrl()); |
| 572 | + _defaultBranchName = Lib2GitSharpExt.GetDefaultRepoName(_gitInfo?.GetUrl(), _gitInfo?.PersonalToken); |
574 | 573 | } |
575 | 574 |
|
576 | 575 | /// <summary> |
@@ -1183,7 +1182,7 @@ await Task.Run(() => |
1183 | 1182 |
|
1184 | 1183 | //Notify view models that the repository data has changed |
1185 | 1184 | OnRepositoryChanged?.Invoke(this, EventArgs.Empty); |
1186 | | - _defaultBranchName = Lib2GitSharpExt.GetDefaultRepoName(_gitInfo?.GetUrl()); |
| 1185 | + _defaultBranchName = Lib2GitSharpExt.GetDefaultRepoName(_gitInfo?.GetUrl(), _gitInfo?.PersonalToken); |
1187 | 1186 | } |
1188 | 1187 | catch (Exception ex) |
1189 | 1188 | { |
|
0 commit comments