reflog

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REFLOG_DIR       = "logs"
	REFLOG_DIR_MOD   = 0777
	REFLOG_FILE_MODE = 0666
)

Variables

View Source
var (
	ErrUnparsableReflogLine = errors.New("unparsable reflog line")
)

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(root string) *DB

func (*DB) Delete

func (d *DB) Delete(name plumbing.ReferenceName) error

func (*DB) Exists

func (d *DB) Exists(refname plumbing.ReferenceName) bool

func (*DB) Read

func (d *DB) Read(refname plumbing.ReferenceName) (*Reflog, error)

func (*DB) Rename

func (d *DB) Rename(oldName, newName plumbing.ReferenceName) error

func (*DB) Write

func (d *DB) Write(o *Reflog) error

type Entries

type Entries []*Entry

type Entry

type Entry struct {
	O, N      plumbing.Hash
	Committer object.Signature
	Message   string
}

type Reflog

type Reflog struct {
	Entries Entries
	// contains filtered or unexported fields
}

func (*Reflog) Clear

func (o *Reflog) Clear()

func (*Reflog) Drop

func (o *Reflog) Drop(index int, rewritePreviousEntry bool) error

func (*Reflog) Empty

func (o *Reflog) Empty() bool

func (*Reflog) Push

func (o *Reflog) Push(oid plumbing.Hash, committer *object.Signature, message string)

Push New Entry

Jump to

Keyboard shortcuts

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