public ActionResult GetInfoRefs(string url) { var service = this.GetService(); var resourceInfo = this.FileManager.GetResourceInfo(url); if (resourceInfo.Type != ResourceType.Directory) { var repoPath = ((FileInfo)resourceInfo.FileSystemInfo).Directory.Parent.FullName; GitUtilities.UpdateServerInfo(repoPath); if (resourceInfo.Type == ResourceType.NotFound) { resourceInfo = this.FileManager.GetResourceInfo(url); } } if (service == null || resourceInfo.Type == ResourceType.Directory) { return(this.Fetch(url)); } else { var repoPath = ((FileInfo)resourceInfo.FileSystemInfo).Directory.Parent.FullName; return(new GitCommandResult("{0} --stateless-rpc --advertise-refs .", service, repoPath)); } }