You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
Activity