gogit

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package gogit reads bounded blobs from local Git repositories through go-git. It falls back to the git binary for object formats and repository layouts that go-git v5 cannot read.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blob

func Blob(ctx context.Context, dir, commit, blobPath string, maxBytes int64) (content []byte, binary, truncated bool, err error)

Blob reads path from commit through go-git. It caps content at maxBytes and reports whether the blob is binary or was truncated. It falls back to the git binary when go-git cannot read the repository.

func InspectBlob

func InspectBlob(ctx context.Context, dir, commit, blobPath string, maxBytes int64) (clone.BlobResult, error)

InspectBlob reads path from commit through go-git and classifies the returned bytes. It falls back to the git binary when go-git cannot read the repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL