diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-03 11:12:15 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2014-05-03 11:12:15 +0800 |
commit | 163fcec59fd110db9edd459a06671962d48d87fa (patch) | |
tree | 9426737190f595f47892ff9db596a6c2750f6caf /models | |
parent | e10096ee2e7985cfd73553f52b09994af025cd93 (diff) | |
download | gitea-163fcec59fd110db9edd459a06671962d48d87fa.tar.gz gitea-163fcec59fd110db9edd459a06671962d48d87fa.zip |
resolved #155
Diffstat (limited to 'models')
-rw-r--r-- | models/update.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/models/update.go b/models/update.go index 648c45f160..75bcc1d487 100644 --- a/models/update.go +++ b/models/update.go @@ -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) |