mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
refactor<*>: rewrite all with AvaloniaUI
This commit is contained in:
parent
0136904612
commit
2a62596999
521 changed files with 19780 additions and 23244 deletions
15
src/Commands/QueryRepositoryRootPath.cs
Normal file
15
src/Commands/QueryRepositoryRootPath.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
namespace SourceGit.Commands {
|
||||
public class QueryRepositoryRootPath : Command {
|
||||
public QueryRepositoryRootPath(string path) {
|
||||
WorkingDirectory = path;
|
||||
Args = "rev-parse --show-toplevel";
|
||||
RaiseError = false;
|
||||
}
|
||||
|
||||
public string Result() {
|
||||
var rs = ReadToEnd().StdOut;
|
||||
if (string.IsNullOrEmpty(rs)) return null;
|
||||
return rs.Trim();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue