-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
async Task<bool> GetIsGitRepo()
{
var result = await RunGit("rev-parse --show-toplevel", true);
if (result.ExitCode != 0 || string.IsNullOrEmpty(result.Output))
return false;
// This check doesn't cover cases where Assets dir is a git repo, or a project is within a bigger repo
// I also got feedback that this code is hard to read, probably need to add a comment or refactor it
return Path.GetFullPath(result.Output.Trim()) != Directory.GetCurrentDirectory() || Path.GetFullPath(PhysicalPath) == Path.GetFullPath(Application.dataPath);
}
Metadata
Metadata
Assignees
Labels
No labels