MCPcopy
hub / github.com/rilldata/rill / commitTimestamp

Method commitTimestamp

runtime/drivers/admin/repo_git.go:368–374  ·  view source on GitHub ↗

commitTimestamp returns the timestamp of the latest commit on the current branch.

(ctx context.Context)

Source from the content-addressed store, hash-verified

366
367// commitTimestamp returns the timestamp of the latest commit on the current branch.
368func (r *gitRepo) commitTimestamp(ctx context.Context) (time.Time, error) {
369 out, err := gitutil.Run(ctx, r.repoDir, "log", "-1", "--format=%aI", "HEAD")
370 if err != nil {
371 return time.Time{}, err
372 }
373 return time.Parse(time.RFC3339, out)
374}
375
376func (r *gitRepo) fetchCurrentBranch(ctx context.Context) error {
377 branch, err := currentBranch(r.repoDir)

Callers 1

CommitTimestampMethod · 0.80

Calls 2

RunFunction · 0.92
ParseMethod · 0.80

Tested by

no test coverage detected