Skip to content

Commit

Permalink
Fixed could not retreive any commit information when project places i…
Browse files Browse the repository at this point in the history
…nto submodule.
  • Loading branch information
kekyo committed May 28, 2024
1 parent 25739ac commit 71572e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion RelaxVersioner.Core/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ public static async Task<StructuredRepository> 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);
Expand Down

0 comments on commit 71572e7

Please sign in to comment.