internal

package
v0.0.0-...-8271a42 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyObjectDelta

func ApplyObjectDelta(r LocalRepository, delta GitObjectDelta) error

func CreateSha1Hex

func CreateSha1Hex(content []byte) (string, error)

func FindNull

func FindNull(s string) int

func Map

func Map[T any](slice []T, fn func(T) T) []T

Types

type GitObject

type GitObject struct {
	ObjectName  string
	Content     []byte
	ContentSize int64
}

type GitObjectDelta

type GitObjectDelta struct {
	ObjectSha   string
	Content     []byte
	ContentSize int64
}

type GitReference

type GitReference struct {
	Ref    string
	RefSha string
}

type LocalRepository

type LocalRepository struct {
	RootName string
}

func (*LocalRepository) CatFile

func (r *LocalRepository) CatFile(hashHex string) (string, error)

func (*LocalRepository) GitDir

func (r *LocalRepository) GitDir() string

func (*LocalRepository) HeadName

func (r *LocalRepository) HeadName() string

func (*LocalRepository) Init

func (r *LocalRepository) Init() error

func (*LocalRepository) ObjectExists

func (r *LocalRepository) ObjectExists(hashHex string) bool

func (*LocalRepository) ObjectsName

func (r *LocalRepository) ObjectsName() string

func (*LocalRepository) ReadObject

func (r *LocalRepository) ReadObject(hashHex string) (string, error)

func (*LocalRepository) ReadTreeObject

func (r *LocalRepository) ReadTreeObject(hashHex string, nameonly bool) ([]string, error)

func (*LocalRepository) RefsName

func (r *LocalRepository) RefsName() string

func (*LocalRepository) WriteBlobObject

func (r *LocalRepository) WriteBlobObject(filename string) ([]byte, string, error)

func (*LocalRepository) WriteCommitObject

func (r *LocalRepository) WriteCommitObject(treeSha string, parentSha string, message string) (string, error)

func (*LocalRepository) WriteObject

func (r *LocalRepository) WriteObject(hashHex string, content []byte) error

func (*LocalRepository) WriteObjectWithType

func (r *LocalRepository) WriteObjectWithType(objType string, content []byte) error

func (*LocalRepository) WriteTreeObject

func (r *LocalRepository) WriteTreeObject(dirname string) ([]byte, string, error)

type PackfileObjectHeader

type PackfileObjectHeader struct {
	ObjectType  PackFileObjectType
	HeaderSize  int
	ContentSize int64
}

Jump to

Keyboard shortcuts

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