Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 73c873e

Browse files
Adding warning messages in the event that branch operations cannot be completed
1 parent eec0b47 commit 73c873e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

GitHub.Unity.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@
342342
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
343343
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
344344
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
345+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EUnitTestFramework_002ESettings_002EMigrations_002ERemoveBuildPolicyAlwaysMigration/@EntryIndexedValue">True</s:Boolean>
345346
<s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean>
346347
<s:String x:Key="/Default/Housekeeping/UnitTestingMru/UnitTestSessionDefault/PlatformType/@EntryValue">x64</s:String>
347348
</wpf:ResourceDictionary>

src/GitHub.Api/Git/Repository.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ private void RepositoryManager_OnLocalBranchRemoved(string name)
249249
localBranches.Remove(name);
250250
OnLocalBranchListChanged?.Invoke();
251251
}
252+
else
253+
{
254+
Logger.Warning("Branch {0} is not found", name);
255+
}
252256
}
253257

254258
private void RepositoryManager_OnLocalBranchAdded(string name)
@@ -263,6 +267,10 @@ private void RepositoryManager_OnLocalBranchAdded(string name)
263267
localBranches.Add(name, branch.Value);
264268
OnLocalBranchListChanged?.Invoke();
265269
}
270+
else
271+
{
272+
Logger.Warning("Branch {0} is already present", name);
273+
}
266274
}
267275

268276
private void RepositoryManager_OnLocalBranchUpdated(string name)
@@ -285,6 +293,14 @@ private void RepositoryManager_OnRemoteBranchAdded(string remote, string name)
285293
branchList.Add(name, new ConfigBranch { Name = name, Remote = remotes[remote] });
286294
OnRemoteBranchListChanged?.Invoke();
287295
}
296+
else
297+
{
298+
Logger.Warning("Branch {0} is already present in Remote {1}", name, remote);
299+
}
300+
}
301+
else
302+
{
303+
Logger.Warning("Remote {0} is not found", remote);
288304
}
289305
}
290306

@@ -298,6 +314,14 @@ private void RepositoryManager_OnRemoteBranchRemoved(string remote, string name)
298314
localBranches.Remove(name);
299315
OnRemoteBranchListChanged?.Invoke();
300316
}
317+
else
318+
{
319+
Logger.Warning("Branch {0} is not found in Remote {1}", name, remote);
320+
}
321+
}
322+
else
323+
{
324+
Logger.Warning("Remote {0} is not found", remote);
301325
}
302326
}
303327

0 commit comments

Comments
 (0)