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