commitTimestamp returns the timestamp of the latest commit on the current branch.
(ctx context.Context)
| 366 | |
| 367 | // commitTimestamp returns the timestamp of the latest commit on the current branch. |
| 368 | func (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 | |
| 376 | func (r *gitRepo) fetchCurrentBranch(ctx context.Context) error { |
| 377 | branch, err := currentBranch(r.repoDir) |
no test coverage detected