From 71572e79f94bebee5ca795f5152def8e7fae3c77 Mon Sep 17 00:00:00 2001 From: Kouji Matsui Date: Tue, 28 May 2024 20:02:21 +0900 Subject: [PATCH] Fixed could not retreive any commit information when project places into submodule. --- RelaxVersioner.Core/Utilities.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RelaxVersioner.Core/Utilities.cs b/RelaxVersioner.Core/Utilities.cs index 53d2a72..34d0c13 100644 --- a/RelaxVersioner.Core/Utilities.cs +++ b/RelaxVersioner.Core/Utilities.cs @@ -81,7 +81,9 @@ public static async Task OpenRepositoryAsync( { var repository = await TraversePathToRootAsync(candidatePath, async path => { - if (Directory.Exists(Path.Combine(path, ".git"))) + var gitPath = Path.Combine(path, ".git"); + if (Directory.Exists(gitPath) || + File.Exists(gitPath)) // submodule { var r = await Repository.Factory.OpenStructureAsync(path); logger.Message(LogImportance.Low, "Repository opened, Path={0}", path);