Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GitCommand = "git"
GitCommand is the path to the git binary, overridden in tests to check behavior when git is not installed.
Functions ¶
func Archive ¶
Archive creates a tar archive of the files in the subdirectory given by subdir of the git repository at gitRepoDir. This is accomplished by running `git archive --format=tar HEAD:subdir` in the git repository directory.
The archive is written to the returned io.Reader. It is not necessary to close the returned reader. Any error encountered while starting the command will be returned immediately. Any error encountered after the command is running will be returned on the next read from the returned io.Reader.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.