Backport #29054. Fix #28840 This backport is for 1.21 only and it is different from the change in 1.22: this backport still accept the legacy date format to avoid breaking.
This commit is contained in:
parent
1aaeec6da7
commit
732d511e04
8 changed files with 104 additions and 149 deletions
|
@ -236,7 +236,7 @@ func GetLatestCommitTime(ctx context.Context, repoPath string) (time.Time, error
|
|||
return time.Time{}, err
|
||||
}
|
||||
commitTime := strings.TrimSpace(stdout)
|
||||
return time.Parse(GitTimeLayout, commitTime)
|
||||
return time.Parse("Mon Jan _2 15:04:05 2006 -0700", commitTime)
|
||||
}
|
||||
|
||||
// DivergeObject represents commit count diverging commits
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue