Documentation ¶
Index ¶
- Constants
- Variables
- func CommitArg(c string) string
- func ExecCommand(ctx context.Context, name string, arg ...string) *exec.Cmd
- func GitCheckoutTree(ctx context.Context, repoDir string, toDir string, commit string) error
- func GitCloneBare(ctx context.Context, dir string) error
- func GitVersion(ctx context.Context) error
- func IsCommit(commit string) bool
- func Run(commitList []string) error
Constants ¶
View Source
const (
GithubDolt = "https://github.com/dolthub/dolt.git"
)
Variables ¶
View Source
var Debug bool
Functions ¶
func GitCheckoutTree ¶
GitCheckoutTree checks out `commit` from the Git repo at `repoDir` into `toDir`. It does it without copying the entire git repository. First we run `git read-tree` with a GIT_INDEX_FILE set to `$toDir/.buildindex`, which gets an index for the commit fully populated into the file. Then we run `git checkout-index -a` referencing the same INDEX_FILE, which populates the current working directory (`toDir`) with the contents of the index file.
func GitCloneBare ¶
GitClone clones the dolt repo into `${dir}/dolt.git`
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.