git

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCommitObject

func CreateCommitObject(tree, parent, author, committer, message string) ([]byte, int)

Create a git commit object and return its compressed data and decompressed size

func CreatePackedObject

func CreatePackedObject(obj []byte, decompressedSize int) []byte

Create a git packed object

func PushCommit

func PushCommit(url, username, password string, pack []byte) error

Types

type GitConfig

type GitConfig struct {
	URL    string
	Branch string
	Name   string
	Email  string
}

type GitCredentials

type GitCredentials struct {
	Username string
	Password string
}

type Repository

type Repository interface {
	// Clean up the repository
	Close() error

	// Push an empty commit to the repository and return the commit hash
	PushEmptyCommit() (string, error)
}

Jump to

Keyboard shortcuts

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