This section is empty.


This section is empty.


func EnsureSameRepo

func EnsureSameRepo(files ...string) (repoDir string, err error)

    EnsureSameRepo ensures that all files belong to the same git repository and returns its absolute path.

    func Exec

    func Exec(context string) func(args ...string) (out string, err error)

      Exec returns a function that executes a git command and returns its standard output. The context must be a path to an existing file or directory.

      It is suitable only for commands that exit quickly and have small output, e.g. rev-parse.

      func RefExists

      func RefExists(repoDir, ref string) (bool, error)

        RefExists returns true if the git ref exists.

        func TopLevel

        func TopLevel(path string) (string, error)

          TopLevel returns the repository dir for the path.


          This section is empty.

          Source Files