mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-25 11:24:02 +08:00
- move issue tracker and commit hash links parsing to view models - parsing links async - make sure matched hash is a valid commit oid - disable `CHILDREN` row in submodule info panel Signed-off-by: leo <longshuang@msn.cn>
18 lines
393 B
C#
18 lines
393 B
C#
namespace SourceGit.Commands
|
|
{
|
|
public class IsCommitSHA : Command
|
|
{
|
|
public IsCommitSHA(string repo, string hash)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Args = $"cat-file -t {hash}";
|
|
}
|
|
|
|
public bool Result()
|
|
{
|
|
var rs = ReadToEnd();
|
|
return rs.IsSuccess && rs.StdOut.Trim().Equals("commit");
|
|
}
|
|
}
|
|
}
|