(ctx context.Context, sha, format string)
| 364 | } |
| 365 | |
| 366 | func (c *Client) lookupCommit(ctx context.Context, sha, format string) ([]byte, error) { |
| 367 | args := []string{"-c", "log.ShowSignature=false", "show", "-s", "--pretty=format:" + format, sha} |
| 368 | cmd, err := c.Command(ctx, args...) |
| 369 | if err != nil { |
| 370 | return nil, err |
| 371 | } |
| 372 | out, err := cmd.Output() |
| 373 | if err != nil { |
| 374 | return nil, err |
| 375 | } |
| 376 | return out, nil |
| 377 | } |
| 378 | |
| 379 | // ReadBranchConfig parses the `branch.BRANCH.(remote|merge|pushremote|gh-merge-base)` part of git config. |
| 380 | // If no branch config is found or there is an error in the command, it returns an empty BranchConfig. |
no test coverage detected