From 4d8ecca72eff6d8d1465652c46800d9912dffe14 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 11 Jun 2021 12:16:45 +0200 Subject: [PATCH] Hopefully fix worktree support --- src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs b/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs index c25efc43..e7a6d851 100644 --- a/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs +++ b/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs @@ -295,7 +295,7 @@ public GitCommit GetCommit(GitObjectId sha, bool readAuthor = false) if (objectish.StartsWith("refs/", StringComparison.Ordinal)) { // Match on loose ref files by their canonical name. - possibleLooseFileMatches.Add(Path.Combine(this.GitDirectory, objectish)); + possibleLooseFileMatches.Add(Path.Combine(this.CommonDirectory, objectish)); skipObjectIdLookup = true; } else