Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
no .git file
  • Loading branch information
yufeih committed Oct 20, 2023
commit 0e1f7daee7640aa3782225b56800fd5bcc1a0807
5 changes: 3 additions & 2 deletions src/Docfx.Common/Git/GitUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ static bool IsGitRoot(string directory)
{
var gitPath = Path.Combine(directory, ".git");

// git submodule contains only a .git file instead of a .git folder
return Directory.Exists(gitPath) || File.Exists(gitPath);
// GitReader does not support .git as file in submodules
// https://github.com/kekyo/GitReader/blob/4126738704ee8b6e330e99c6bc81e9de8bc925c9/GitReader.Core/Primitive/PrimitiveRepositoryFacade.cs#L27-L30
return Directory.Exists(gitPath);
}
}

Expand Down