mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 02:40:24 +08:00
It has several advantages: * reduce the memory costed by histories * higher performance while parsing commits * no need to calculate subject every time, which is invoked most frequently to render histories
20 lines
496 B
C#
20 lines
496 B
C#
namespace SourceGit.Commands
|
|
{
|
|
public class QueryCommitFullMessage : Command
|
|
{
|
|
public QueryCommitFullMessage(string repo, string sha)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
Args = $"show --no-show-signature --pretty=format:%B -s {sha}";
|
|
}
|
|
|
|
public string Result()
|
|
{
|
|
var rs = ReadToEnd();
|
|
if (rs.IsSuccess) return rs.StdOut.TrimEnd();
|
|
return string.Empty;
|
|
}
|
|
}
|
|
}
|