mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
14 lines
412 B
C#
14 lines
412 B
C#
namespace SourceGit.Commands {
|
|
public class Version : Command {
|
|
public Version() {
|
|
Args = "-v";
|
|
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);
|
|
}
|
|
}
|
|
}
|