summary refs log tree commit diff
path: root/LibGitTest/Test3.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-11 18:54:56 +0100
committerRory& <root@rory.gay>2025-12-11 18:54:56 +0100
commit6e2f48e24b0c003b4c8547ff88fc1a7f890a1c1e (patch)
tree7aac58a3a1045bde51e989cb0a1ab1c26c28e68f /LibGitTest/Test3.cs
parentnet10 (diff)
downloadGitTools-6e2f48e24b0c003b4c8547ff88fc1a7f890a1c1e.tar.xz
read indexes and packs correctly
Diffstat (limited to 'LibGitTest/Test3.cs')
-rw-r--r--LibGitTest/Test3.cs9
1 files changed, 6 insertions, 3 deletions
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