mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 19:02:39 +08:00
24 lines
511 B
C#
24 lines
511 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace SourceGit.Commands
|
|
{
|
|
public class QueryRepositoryRootPath : Command
|
|
{
|
|
public QueryRepositoryRootPath(string path)
|
|
{
|
|
WorkingDirectory = path;
|
|
Args = "rev-parse --show-toplevel";
|
|
}
|
|
|
|
public Result GetResult()
|
|
{
|
|
return ReadToEnd();
|
|
}
|
|
|
|
public async Task<Result> GetResultAsync()
|
|
{
|
|
return await ReadToEndAsync().ConfigureAwait(false);
|
|
}
|
|
}
|
|
}
|