Skip to content

Commit 329fe56

Browse files
committed
show no remote repositories
1 parent 3ce24d9 commit 329fe56

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

src/ViewModels/Launcher.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,30 @@ public async Task FetchAllRepositoriesAsync()
132132

133133
var total = 0;
134134
var succeeded = 0;
135+
var noRemoteNames = new List<string>();
135136

136137
foreach (var page in pages)
137138
{
138139
if (page.Data is not Repository repo)
139140
continue;
140141

142+
if (repo.Remotes.Count == 0)
143+
{
144+
noRemoteNames.Add(page.Node.Name);
145+
continue;
146+
}
147+
141148
total++;
142149
if (await repo.FetchAllRemotesAsync())
143150
succeeded++;
144151
}
145152

146-
if (total > 0)
147-
Models.Notification.Send(null, $"Fetched {succeeded}/{total} repositories", succeeded < total);
153+
var message = $"Fetched {succeeded}/{total} repositories";
154+
155+
if (noRemoteNames.Count > 0)
156+
message += $"\n{noRemoteNames.Count} repositories skipped (no remote):\n{string.Join("\n ", noRemoteNames)}";
157+
158+
Models.Notification.Send(null, message, succeeded < total);
148159
}
149160

150161
public void SwitchWorkspace(Workspace to)

0 commit comments

Comments
 (0)