diff options
author | nulltoken <emeric.fermas@gmail.com> | 2011-06-07 23:56:53 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2011-06-07 23:57:47 +0400 |
commit | 272b92db12cad8e80ef57c3b29ec4e37692195e9 (patch) | |
tree | d8c12903bb66ff60fd799fa1b7532476e867b98e /LibGit2Sharp/RepositoryInformation.cs | |
parent | c52db7dfc77cf31616dfe1feb0fbbfd9cff98ce4 (diff) |
Defer resolving of Repository.Info
Diffstat (limited to 'LibGit2Sharp/RepositoryInformation.cs')
-rw-r--r-- | LibGit2Sharp/RepositoryInformation.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/LibGit2Sharp/RepositoryInformation.cs b/LibGit2Sharp/RepositoryInformation.cs index 97588070..7129806b 100644 --- a/LibGit2Sharp/RepositoryInformation.cs +++ b/LibGit2Sharp/RepositoryInformation.cs @@ -9,11 +9,15 @@ namespace LibGit2Sharp { private readonly Repository repo; - internal RepositoryInformation(Repository repo, string posixPath, string posixWorkingDirectoryPath, bool isBare) + internal RepositoryInformation(Repository repo, bool isBare) { this.repo = repo; - Path = PosixPathHelper.ToNative(posixPath); IsBare = isBare; + + string posixPath = NativeMethods.git_repository_path(repo.Handle, GitRepositoryPathId.GIT_REPO_PATH).MarshallAsString(); + string posixWorkingDirectoryPath = NativeMethods.git_repository_path(repo.Handle, GitRepositoryPathId.GIT_REPO_PATH_WORKDIR).MarshallAsString(); + + Path = PosixPathHelper.ToNative(posixPath); WorkingDirectory = PosixPathHelper.ToNative(posixWorkingDirectoryPath); } |