Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 10:46:10 +01:00
This commit is contained in:
Lunny Xiao 2014-05-03 11:12:15 +08:00
parent e10096ee2e
commit 163fcec59f

View file

@ -29,6 +29,12 @@ func Update(refName, oldCommitId, newCommitId, userName, repoName string, userId
gitUpdate.Dir = f
gitUpdate.Run()
isDel := strings.HasPrefix(newCommitId, "0000000")
if isDel {
qlog.Info("del rev", refName, "from", userName+"/"+repoName+".git", "by", userId)
return
}
repo, err := git.OpenRepository(f)
if err != nil {
qlog.Fatalf("runUpdate.Open repoId: %v", err)