Skip to content

Commit

Permalink
fix: long commit messages causes build to freeze (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewingjm committed Mar 26, 2024
1 parent 77b411d commit 666676f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PowerVersion/Repositories/GitRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public GitCommit GetCommit(string reference = "HEAD")
public IEnumerable<GitCommit> GetCommits(string reference = "HEAD", string path = null)
{
return JsonSerializer.Deserialize<GitCommit[]>(
this.ExecuteArrayCommand($"log {reference} --pretty=format:{{\\\"Hash\\\":\\\"%h\\\",\\\"Subject\\\":\\\"%s\\\",\\\"Body\\\":\\\"%b\\\"}} --no-abbrev-commit --reverse {(path != null ? $"-- {path}" : string.Empty)}"));
this.ExecuteArrayCommand($"--no-pager log {reference} --pretty=format:{{\\\"Hash\\\":\\\"%h\\\",\\\"Subject\\\":\\\"%s\\\",\\\"Body\\\":\\\"%b\\\"}} --no-abbrev-commit --reverse {(path != null ? $"-- {path}" : string.Empty)}"));
}

/// <inheritdoc/>
Expand All @@ -71,7 +71,7 @@ public IEnumerable<GitCommit> GetCommits(string left, string right, string path
}

return JsonSerializer.Deserialize<GitCommit[]>(
this.ExecuteArrayCommand($"log {left}..{right} --pretty=format:{{\\\"Hash\\\":\\\"%h\\\",\\\"Subject\\\":\\\"%s\\\",\\\"Body\\\":\\\"%b\\\"}} --no-abbrev-commit --reverse {(path != null ? $"-- {path}" : string.Empty)}"));
this.ExecuteArrayCommand($"--no-pager log {left}..{right} --pretty=format:{{\\\"Hash\\\":\\\"%h\\\",\\\"Subject\\\":\\\"%s\\\",\\\"Body\\\":\\\"%b\\\"}} --no-abbrev-commit --reverse {(path != null ? $"-- {path}" : string.Empty)}"));
}

/// <inheritdoc/>
Expand Down

0 comments on commit 666676f

Please sign in to comment.