MCPcopy Index your code
hub / github.com/sinclairtarget/git-who / allowCommit

Function allowCommit

internal/git/parse.go:33–55  ·  view source on GitHub ↗
(commit Commit, now time.Time)

Source from the content-addressed store, hash-verified

31}
32
33func allowCommit(commit Commit, now time.Time) bool {
34 if commit.AuthorName == "" && commit.AuthorEmail == "" {
35 logger().Debug(
36 "skipping commit with no author",
37 "commit",
38 commit.Name(),
39 )
40
41 return false
42 }
43
44 if commit.Date.After(now) {
45 logger().Debug(
46 "skipping commit with commit date in the future",
47 "commit",
48 commit.Name(),
49 )
50
51 return false
52 }
53
54 return true
55}
56
57// Turns an iterator over lines from git log into an iterator of commits
58func ParseCommits(lines iter.Seq[string]) (iter.Seq[Commit], func() error) {

Callers 1

ParseCommitsFunction · 0.85

Calls 2

loggerFunction · 0.70
NameMethod · 0.65

Tested by

no test coverage detected