Dev #13

Merged
omegaleo merged 49 commits from dev into main 2026-02-13 14:28:46 +00:00
4 changed files with 37 additions and 11 deletions
Showing only changes of commit 28be9bc539 - Show all commits
+18 -7
View File
@@ -23,13 +23,12 @@ if (changes.FolderName.IsNotNullOrEmpty())
{
RecursiveOutput(new List<ChangeFolder>() { changes });
Console.WriteLine(new string('=', 20));
Console.WriteLine("What do you want to do in this repository?");
Console.WriteLine("1. Commit all changes");
var option = 99;
if (int.TryParse(Console.ReadLine(), out var option))
while (option != 0)
{
while (option != 0)
ShowOptions();
if (option != 99)
{
switch (option)
{
@@ -46,14 +45,17 @@ if (changes.FolderName.IsNotNullOrEmpty())
var signature = new Signature("Nuno 'Omega Leo' Diogo", "nunodiogo@omegaleo.pt", DateTimeOffset.Now);
git.Commit(msg, signature);
break;
case 2:
git.Push();
break;
default:
Console.WriteLine("Invalid Option!");
break;
}
int.TryParse(Console.ReadLine(), out option);
}
int.TryParse(Console.ReadLine(), out option);
}
}
else
@@ -80,3 +82,12 @@ void RecursiveOutput(List<ChangeFolder> folders, int depth = 0)
}
}
}
void ShowOptions()
{
Console.Clear();
Console.WriteLine(new string('=', 20));
Console.WriteLine("What do you want to do in this repository?");
Console.WriteLine("1. Commit all changes");
Console.WriteLine("2. Push");
}
+13
View File
@@ -113,5 +113,18 @@ namespace OmegaLeo.HelperLib.Git
_repo.Commit(message, author, author);
}
public void Push()
{
try {
var remote = _repo.Network.Remotes["origin"];
var options = new PushOptions();
var pushRefSpec = @"refs/heads/master";
_repo.Network.Push(remote, new string[] {pushRefSpec}, options);
}
catch (Exception e) {
Console.WriteLine("Exception:RepoActions:PushChanges " + e.Message);
}
}
}
}
+3 -1
View File
@@ -1,2 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003Fhome_003Fomegaleo_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc61cc76f205b4535a5b4f40700c07900b2d200_003Fe5_003F6b3ec67e_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003Fhome_003Fomegaleo_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc61cc76f205b4535a5b4f40700c07900b2d200_003Fe5_003F6b3ec67e_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATreeChanges_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003Fhome_003Fomegaleo_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F7478b0ce6362feb345e793626f5c504bd9d7ffeb748226521658c85fc4e29_003FTreeChanges_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATreeEntryChanges_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003Fhome_003Fomegaleo_003F_002Econfig_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F2b7912eaeadb1d9a91a3f891a244b5cd4a856d9dde42694e941ee6a2994_003FTreeEntryChanges_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
@@ -98,7 +98,7 @@ namespace GameDevLibrary.Extensions
return values;
}
public static IEnumerable<TSource> DistinctBy<TSource, TKey>
/*public static IEnumerable<TSource> DistinctBy<TSource, TKey>
(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
{
HashSet<TKey> seenKeys = new HashSet<TKey>();
@@ -109,7 +109,7 @@ namespace GameDevLibrary.Extensions
yield return element;
}
}
}
}*/
// Idea obtained from TaroDev's video on things to do in Unity - https://youtu.be/Ic5ux-tpkCE?t=302