# README
go-libgitfastimport
This is a fork of https://git.lukeshu.com/go/libfastimport
It provides Go interface to read and write Git fast-import files.
Changes
- Implement renames
- Add some tests to show usage for reading files
# Functions
NewBackend creates a new Backend object that writes to the given io.WriteCloser.
NewFrontend creates a new Frontend object that reads from the given io.Reader.
ParseIdent parses a string containing an Ident.
PathEscape escapes a path in case it contains special characters.
PathUnescape unescapes a quoted path.
# Structs
A Backend is something that consumes a fast-import stream; the Backend object provides methods for writing to it.
CmdAlias requests that the Backend record that a mark refers to a given object without first creating any new object.
CmdBlob requests that the Backend write file revision.
CmdCatBlob requests that the Backend to report back (over the auxiliary cat-blob stream) with the SHA-1 and content of the requested blob.
CmdCheckpoint requests that the Backend flush already-sent data.
CmdComment is a comment line; not a real command.
CmdCommit requests that the Backend creates or updates a branch with a new commit.
CmdCommitEnd indicates the Frontend will be sending no more "File" or "Note" commands that are "part of" the current CmdCommit.
CmdDone indicates to the Backend that no more commands will be sent.
CmdFeature requests that the Backend immediately aborts with an error if it does not support the specified feature.
CmdGetMark requests that the Backend to report back (over the auxiliary cat-blob stream) with the SHA-1 corresponding to the given Mark.
CmdLs requests that the Backend to report back (over the auxiliary cat-blob stream) with information about the object at a path in the specified commit.
CmdOption requests that the Backend changes its settings.
CmdProgress requests that the Backend print the given string to its standard output channel.
CmdReset requests that the Backend creates (or recreates) the named ref (usually a branch), optionally starting from a specific revision.
CmdTag requests that the Backend creates an *annotated* tag referencing a specific commit.
FileCopy appears after a CmdCommit (and before a CmdCommitEnd), and causes the CmdCommit to recursively copy an existing file or subdirectory to a different location.
FileDelete appears after a CmdCommit (and before a CmdCommitEnd), and causes the CmdCommit to recursively remove a file or directory.
FileDeleteAll appears after a CmdCommit (and before a CmdCommitEnd), and removes all files and directories from the CmdCommit.
FileModify appears after a CmdCommit (and before a CmdCommitEnd), and causes the CmdCommit to add a new file or change the content of an existing file.
FileModifyInline appears after a CmdCommit (and before a CmdCommitEnd), and causes the CmdCommit to add a new file or change the content of an existing file.
FileRename appears after a CmdCommit (and before a CmdCommitEnd), and causes the CmdCommit to rename an existing file or subdirectory to a different location.
A Frontend is something that produces a fast-import stream; the Frontend object provides methods for reading from it.
Ident is a tuple of a commiter's (or author's) name, email, and a timestamp with timezone.
NoteModify appears after a CmdCommit (and before a CmdCommitEnd), and causes the CmdCommit to add a new note describing CommitIsh or change the content of an existing note describing CommitIsh.
NoteModifyInline appears after a CmdCommit (and before a CmdCommitEnd), and causes the CmdCommit to add a new note describing CommitIsh or change the content of an existing note describing CommitIsh.
# Interfaces
Cmd is a command that may be found in a fast-import stream.
# Type aliases
Mode is a file mode as seen by git.
Path is a string storing a git path.
No description provided by the author