diff options
Diffstat (limited to 'bin/gitano-post-receive-hook.in')
-rw-r--r-- | bin/gitano-post-receive-hook.in | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/gitano-post-receive-hook.in b/bin/gitano-post-receive-hook.in index b9de48b..8e352c7 100644 --- a/bin/gitano-post-receive-hook.in +++ b/bin/gitano-post-receive-hook.in @@ -78,7 +78,7 @@ if not repo then gitano.log.critical(" * " .. (tostring(msg))) gitano.log.fatal(gitano.i18n.expand("ERROR_CANNOT_CONTINUE")) end - + if repo.is_nascent then gitano.log.fatal(gitano.i18n.expand("ERROR_REPO_IS_NASCENT", {name=repo.name})) end @@ -88,8 +88,7 @@ end -- emails, ensuring that new rules are applied, etc) local updates = {} -for oldsha, newsha, refname in - (sio.stdin:read("*a")):gmatch("([^ ]+) ([^ ]+) ([^\n]+)\n?") do +for oldsha, newsha, refname in (sio.stdin:read("*a")):gmatch("([^ ]+) ([^ ]+) ([^\n]+)\n?") do gitano.log.ddebug("post-receive:", oldsha, newsha, refname) updates[refname] = {oldsha, newsha, oldsha=oldsha, newsha=newsha} end @@ -135,9 +134,9 @@ if repo.name == "gitano-admin" and updates[admin_repo.HEAD] then gitano.log.syslog.info(msg) local proc = sp.spawn({ - gitano.config.lib_bin_path() .. "/gitano-update-ssh", - gitano.config.repo_path() - }) + gitano.config.lib_bin_path() .. "/gitano-update-ssh", + gitano.config.repo_path() + }) local how, why = proc:wait() if how ~= "exit" or why ~= 0 then gitano.log.crit(gitano.i18n.expand("ERROR_UPDATE_SSH_NOT_WORK")) |