GitRepo.this

Open a git repository.

  1. this(git_repository* payload)
  2. this(char[] path)
    struct GitRepo
    deprecated
    this
    (
    in char[] path
    )

Examples

// throw when path does not exist
assertThrown!GitException(GitRepo(r".\invalid\path\.git"));

// open using the path of the .git directory
auto repo1 = GitRepo(_testRepo);

// open using the base path of the .git directory
auto repo2 = GitRepo(_testRepo.dirName);

Meta