gitutil

package
v0.0.0-...-4d532e9 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModifyCommit

func ModifyCommit(st storer.EncodedObjectStorer, c *object.Commit, newContent map[string]string, message string) (id plumbing.Hash, err error)

func PatchTree

func PatchTree(eos storer.EncodedObjectStorer, t *object.Tree, changes []object.TreeEntry) (id plumbing.Hash, err error)

PatchTree constructs a new tree by applying changes to it. In changes, the ZeroHash signifies deletion of the path.

func SaveBlob

func SaveBlob(st storer.EncodedObjectStorer, data []byte) (id plumbing.Hash, err error)

func SaveCommit

func SaveCommit(st storer.EncodedObjectStorer, c *object.Commit) (id plumbing.Hash, err error)

func SaveConfig

func SaveConfig(st storer.EncodedObjectStorer, cfg *config.Config) (id plumbing.Hash, err error)

func SaveTree

func SaveTree(st storer.EncodedObjectStorer, entries []object.TreeEntry) (id plumbing.Hash, err error)

func SortTreeEntries

func SortTreeEntries(es []object.TreeEntry)

func TestMapToEntries

func TestMapToEntries(st storer.EncodedObjectStorer, in map[string]string) ([]object.TreeEntry, error)

TestMapToEntries provides input to PatchTree. keys are filenames, with suffixes: * '!' = delete * '*' = executable * '@' = symlink * '#' = submodule.

Types

This section is empty.

Jump to

Keyboard shortcuts

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