Minor fix for #2624

This commit is contained in:
Unknwon 2016-02-15 14:57:15 -05:00
parent dc89c51f3e
commit 632c27802c
21 changed files with 300 additions and 198 deletions

View file

@ -592,6 +592,11 @@ func UpdateMirror(m *Mirror) error {
return updateMirror(x, m)
}
func DeleteMirrorByRepoID(repoID int64) error {
_, err := x.Delete(&Mirror{RepoID: repoID})
return err
}
func createUpdateHook(repoPath string) error {
return git.SetUpdateHook(repoPath,
fmt.Sprintf(_TPL_UPDATE_HOOK, setting.ScriptType, "\""+setting.AppPath+"\"", setting.CustomConf))
@ -1620,11 +1625,6 @@ func MirrorUpdate() {
}
}
func DeleteMirrorByRepoID(repoId int64) error {
_, err := x.Delete(&Mirror{RepoID: repoId})
return err
}
// GitFsck calls 'git fsck' to check repository health.
func GitFsck() {
if taskStatusPool.IsRunning(_GIT_FSCK) {