mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
18 lines
No EOL
438 B
C#
18 lines
No EOL
438 B
C#
namespace SourceGit.Commands
|
|
{
|
|
public class Version : Command
|
|
{
|
|
public Version()
|
|
{
|
|
Args = "--version";
|
|
RaiseError = false;
|
|
}
|
|
|
|
public string Query()
|
|
{
|
|
var rs = ReadToEnd();
|
|
if (!rs.IsSuccess || string.IsNullOrWhiteSpace(rs.StdOut)) return string.Empty;
|
|
return rs.StdOut.Trim().Substring("git version ".Length);
|
|
}
|
|
}
|
|
} |