diff options
| author | 2026-02-20 19:06:13 +0800 | |
|---|---|---|
| committer | 2026-02-20 19:07:14 +0800 | |
| commit | aa513c069c1418734aea894dc944e27c6a78a3bb (patch) | |
| tree | 687f0a11bb550fa088fd82a98ceb8979bbc35f69 /cmd/show-object | |
| parent | Comment on prior reverts removing the pack writing API (diff) | |
| signature | No signature | |
Delete everything, I'm redesigning this.
I'll stop using a flat package and make things much more modular.
And also experiment with streaming APIs so large blobs don't OOM us.
Diffstat (limited to 'cmd/show-object')
| -rw-r--r-- | cmd/show-object/main.go | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/cmd/show-object/main.go b/cmd/show-object/main.go deleted file mode 100644 index 591710d0..00000000 --- a/cmd/show-object/main.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "log" - - "codeberg.org/lindenii/furgit" -) - -func main() { - repoPath := flag.String("r", "", "path to repo (.git or bare)") - ref := flag.String("h", "", "ref or hash") - flag.Parse() - - if *repoPath == "" || *ref == "" { - log.Fatal("must provide -r repo and -h ref/hash") - } - - repo, err := furgit.OpenRepository(*repoPath) - if err != nil { - log.Fatalf("open repo: %v", err) - } - defer func() { - _ = repo.Close() - }() - - h, err := repo.ResolveRefFully(*ref) - if err != nil { - log.Fatalf("resolve ref: %v", err) - } - - obj, err := repo.ReadObject(h.Hash) - if err != nil { - log.Fatalf("read object: %v", err) - } - - fmt.Printf("%#v\n", obj) -} |
