summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-05-03 11:12:15 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-05-03 11:12:15 +0800
commit163fcec59fd110db9edd459a06671962d48d87fa (patch)
tree9426737190f595f47892ff9db596a6c2750f6caf /models
parente10096ee2e7985cfd73553f52b09994af025cd93 (diff)
downloadgitea-163fcec59fd110db9edd459a06671962d48d87fa.tar.gz
gitea-163fcec59fd110db9edd459a06671962d48d87fa.zip
resolved #155
Diffstat (limited to 'models')
-rw-r--r--models/update.go6
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)