commands

package
v0.0.0-...-af6ef3e Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit(c *cli.Context)

Commit implements `got commit`

func GetNewestCommit

func GetNewestCommit(objects *bolt.Bucket, hashes []types.Hash) int

func Log

func Log(c *cli.Context)

func Revert

func Revert(c *cli.Context)

Revert implements got revert

func Status

func Status(c *cli.Context)

Status implements the `got status` command.

func TakeSnapshot

func TakeSnapshot(b *bolt.Bucket, filePath string) types.Hash

TakeSnapshot recursivelly snapshots the current directory.

func TreeLookup

func TreeLookup(objects *bolt.Bucket, tree *types.TreeObject, filepath string) []byte

TreeLookup gets the contents of a certain file path in the given tree

Types

type Difference

type Difference struct {
	Type     string
	FilePath string
}

Difference represents a modification between two directory trees.

func TreeDiff

func TreeDiff(objects *bolt.Bucket, treeHash types.Hash, dir string) []Difference

TreeDiff lists the differences between a Tree object in a snapshot and a filesystem path.

Jump to

Keyboard shortcuts

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