mirror of
https://github.com/gogs/gogs.git
synced 2025-12-22 00:00:07 +01:00
vendor: rename "gogits" to "gogs"
This commit is contained in:
@@ -320,6 +320,15 @@ func SyncMirrors() {
|
||||
continue
|
||||
}
|
||||
|
||||
// TODO: Work on #2017 and #4528 together
|
||||
// 1. Get commits after last update time
|
||||
// 2. Simulate push event for new commits, see models/repo_editor.go:164
|
||||
// This automatically triggers the "push" webhook
|
||||
|
||||
// ******************************
|
||||
// EDIT AREA - START
|
||||
// ******************************
|
||||
|
||||
// Get latest commit date and compare to current repository updated time,
|
||||
// update if latest commit date is newer.
|
||||
commitDate, err := git.GetLatestCommitDate(m.Repo.RepoPath(), "")
|
||||
@@ -330,6 +339,10 @@ func SyncMirrors() {
|
||||
continue
|
||||
}
|
||||
|
||||
// ******************************
|
||||
// EDIT AREA - END
|
||||
// ******************************
|
||||
|
||||
if _, err = x.Exec("UPDATE repository SET updated_unix = ? WHERE id = ?", commitDate.Unix(), m.RepoID); err != nil {
|
||||
log.Error(2, "Update repository 'updated_unix' [%s]: %v", m.RepoID, err)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user