aboutsummaryrefslogtreecommitdiffstats
path: root/main/aaudit/aaudit-server.lua
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-07-25 11:41:49 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-07-25 09:49:16 +0000
commitf07d485bb7a366cd0cd71f4b4ef1f4f97cdc782b (patch)
tree65a8b0747772f6490a200e85199533307b47e574 /main/aaudit/aaudit-server.lua
parent1aefe1424c251139749c8babe9ff09fd68c36241 (diff)
downloadaports-f07d485bb7a366cd0cd71f4b4ef1f4f97cdc782b.tar.bz2
aports-f07d485bb7a366cd0cd71f4b4ef1f4f97cdc782b.tar.xz
main/aaudit: fix commit without notification, add some error messages
(cherry picked from commit d21e2c60f86b88b519534e4a7bbbe6502db5e279)
Diffstat (limited to 'main/aaudit/aaudit-server.lua')
-rw-r--r--main/aaudit/aaudit-server.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/aaudit/aaudit-server.lua b/main/aaudit/aaudit-server.lua
index 89f2fc0219..f0f73ab6f1 100644
--- a/main/aaudit/aaudit-server.lua
+++ b/main/aaudit/aaudit-server.lua
@@ -123,8 +123,9 @@ local rt_keywords = {
}
local function sendcommitdiff(body, req, R, G)
- if not body then return end
- if not G.notify_emails then return end
+ if not body then return true end
+ if not G.notify_emails then return true end
+ if #G.notify_emails == 0 then return true end
local mail = {
from = req.committer,
@@ -336,7 +337,7 @@ function M.repo_update(req,clientstream)
os.execute(("git --git-dir='%s' branch --quiet -D import;"..
"git --git-dir='%s' gc --quiet --prune=now")
:format(repodir, repodir))
- return false, err
+ return false, err or "Sending commitdiff e-mail failed"
end
end
os.execute(("git --git-dir='%s' branch --quiet --force master import;"..