MCPcopy Create free account
hub / github.com/alibaba/open-code-review / getCommitMessage

Function getCommitMessage

cmd/opencodereview/git.go:24–30  ·  view source on GitHub ↗
(repoDir, commit string)

Source from the content-addressed store, hash-verified

22}
23
24func getCommitMessage(repoDir, commit string) (string, error) {
25 out, err := runGitCmd(repoDir, "log", "-1", "--format=%B", "--end-of-options", commit)
26 if err != nil {
27 return "", fmt.Errorf("git log failed: %w", err)
28 }
29 return strings.TrimSpace(string(out)), nil
30}

Callers 5

loadDelegateContextFunction · 0.85
TestGetCommitMessageFunction · 0.85
runReviewFunction · 0.85

Calls 1

runGitCmdFunction · 0.85

Tested by 3

TestGetCommitMessageFunction · 0.68