Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Commands/QuerySingleCommit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ public class QuerySingleCommit : Command
{
public QuerySingleCommit(string repo, string sha)
{
_repo = repo;
_sha = sha;

WorkingDirectory = repo;
Context = repo;
Args = $"show --no-show-signature --decorate=full --format=%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s -s {sha}";
}

public Models.Commit Result()
{
var isCommitSHA = new IsCommitSHA(_repo, _sha).Result();
if (!isCommitSHA)
return null;

var rs = ReadToEnd();
if (rs.IsSuccess && !string.IsNullOrEmpty(rs.StdOut))
{
Expand All @@ -37,5 +44,8 @@ public Models.Commit Result()

return null;
}

private readonly string _repo;
private readonly string _sha;
}
}
Loading