From 6e2f48e24b0c003b4c8547ff88fc1a7f890a1c1e Mon Sep 17 00:00:00 2001 From: Rory& Date: Thu, 11 Dec 2025 18:54:56 +0100 Subject: read indexes and packs correctly --- LibGitTest/Test3.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'LibGitTest/Test3.cs') diff --git a/LibGitTest/Test3.cs b/LibGitTest/Test3.cs index be7275f..24d6986 100644 --- a/LibGitTest/Test3.cs +++ b/LibGitTest/Test3.cs @@ -1,5 +1,4 @@ using LibGit; -using LibGit.Extensions; namespace LibGitTest; @@ -7,11 +6,15 @@ public class Test3 { public static async Task Run() { - var repo = new GitRepo(new FileRepoSource(@"/home/root@Rory/tmpgit/fosscord-server.git")); + Console.WriteLine("Test3 running"); + var repo = new GitRepo(new FileRepoSource(@"/home/Rory/git/spacebar/server-master/.git")); var packs = repo.GetPacks().GetAsyncEnumerator(); + int count = 0; while(await packs.MoveNextAsync()) { - Console.WriteLine(packs.Current.ToJson()); + count += packs.Current.ObjectCount; + // Console.WriteLine(packs.Current.ToJson()); } + Console.WriteLine($"Read {count} objects from pack files."); } } \ No newline at end of file -- cgit 1.5.1