mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-01 01:14:59 +00: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>
17 lines
393 B
C#
17 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");
|
|
}
|
|
}
|
|
}
|