(ctx context.Context, sha, format string)
| 420 | } |
| 421 | |
| 422 | func (c *Client) lookupCommit(ctx context.Context, sha, format string) ([]byte, error) { |
| 423 | args := []string{"-c", "log.ShowSignature=false", "show", "-s", "--pretty=format:" + format, sha} |
| 424 | cmd, err := c.Command(ctx, args...) |
| 425 | if err != nil { |
| 426 | return nil, err |
| 427 | } |
| 428 | out, err := cmd.Output() |
| 429 | if err != nil { |
| 430 | return nil, err |
| 431 | } |
| 432 | return out, nil |
| 433 | } |
| 434 | |
| 435 | // ReadBranchConfig parses the `branch.BRANCH.(remote|merge|pushremote|gh-merge-base)` part of git config. |
| 436 | // If no branch config is found or there is an error in the command, it returns an empty BranchConfig. |
no test coverage detected