modulepackage
0.0.0-20241104183443-b564634822ca
Repository: https://github.com/richardjennings/g.git
Documentation: pkg.go.dev
# README
G
About
Learning Git Internals by writing a Git in Go.
CLI Usage
See go run ./cmd/gitg --help
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CreateCommit writes the Commit provided in the Object Store.
CurrentBranch returns the name of the current branch.
CurrentCommit return the current commit SHA @todo this probably breaks in detached head...
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FsStatus returns a FfileSet containing all files from the index and working directory with the corresponding status.
No description provided by the author
No description provided by the author
HeadSHA returns the hash pointed to by a branch.
No description provided by the author
Init initializes a git repository.
No description provided by the author
ListBranches lists Git branches from refs/heads and info/refs It does not currently allow listing remote tracking branches.
Ls recursively lists files in path that are not ignored.
No description provided by the author
No description provided by the author
NewSha creates a Sha from either a binary or hex encoded byte slice.
No description provided by the author
No description provided by the author
No description provided by the author
ObjectTree creates a Tree Object with child Objects representing the files and paths in the provided files.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReadIndex reads the Git Index into an Index struct.
No description provided by the author
ReadObjectTree reads an object from the object store.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RestoreStaged removes a staged change from the index.
No description provided by the author
Status returns a FfileSet containing all files from commit, index and working directory with the corresponding status.
No description provided by the author
UpdateBranchHead updates the sha hash pointed to by a branch.
UpdateHead writes branch name as a reference in the Git HEAD file.
No description provided by the author
No description provided by the author
No description provided by the author
WriteBlob writes a file to the object store as a blob and returns a Blob Object representation.
WriteObject writes an object to the object store.
# Constants
AddedInIndex means that the file is in the index but not in the commit.
CopiedInIndex - @todo not sure about this one either - copied (if config option status.renames is set to "copies").
CopiedInWorktree not implemented.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeletedInIndex means that the file has been removed from the index.
DeletedInWorktree means that the file has been removed from the working directory but exists in the commit.
IndexAndWorkingTreeMatch means the file modification time in the working directory is the same as in the index.
NotUpdated means that the modification time of the file in the commit is the same as the one in the index.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RenamedInIndex - @todo I do not understand how to implement this.
RenamedInWorktree not implemented.
TypeChangedInIndex mentioned in the Git docs but not implemented here - file type changed (regular file, symbolic link or submodule).
TypeChangedInWorktreeSinceIndex is not implemented.
Untracked means that the file is in the working directory but not in the index or commit.
UntrackedInIndex means that the file is not in the Index.
UpdatedInIndex means that the modification time of the file in the index is newer than that of the commit.
WorktreeChangedSinceIndex means the file in the working directory has a newer modification time than the file in the index.
# Variables
PackFileReadCloser is a Factory that creates a ReadCloser for reading Object content from a Pack File that is Not Deltified.
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author