From 0fad4fe5e59a7d908ce62b80b7a14a7c74149ec5 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 11 Jun 2026 13:03:56 +0000 Subject: internal/testgit: packobjects, verifypack --- internal/testgit/packobjects.go | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 internal/testgit/packobjects.go (limited to 'internal/testgit/packobjects.go') diff --git a/internal/testgit/packobjects.go b/internal/testgit/packobjects.go new file mode 100644 index 00000000..9f56eef0 --- /dev/null +++ b/internal/testgit/packobjects.go @@ -0,0 +1,47 @@ +package testgit + +import ( + "bytes" + "iter" + "path/filepath" + "strings" + "testing" + + "lindenii.org/go/furgit/object/id" +) + +// PackObjectsOptions controls one pack-objects invocation. +type PackObjectsOptions struct { + // RevIndex requests writing a .rev reverse index alongside the pack. + RevIndex bool +} + +// PackObjects packs the supplied objects with git pack-objects +// into a temporary directory, +// and returns the artifact path prefix "