gitolite-admin

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8614e92155e8cc19f338f3356b215043694c3ce8
parent 7548d516a305f9427b9e98bbb05d130386996c96
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun, 16 Sep 2018 15:35:06 +0300

Support multiple repos in repo line in find_stagits.lua

Diffstat:
Mlocal/find_stagits.lua | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/local/find_stagits.lua b/local/find_stagits.lua @@ -5,13 +5,15 @@ local f = assert( io.open( gitolite .. "/conf/gitolite.conf" ) ) local cmd = { } -local current_repo +local current_repos for l in f:lines() do - local repo = l:match( "^repo (.*)" ) - if repo then - current_repo = repo + local repos = l:match( "^repo (.*)" ) + if repos then + current_repos = repos elseif l == "\toption hook.post-receive = stagit" then - table.insert( cmd, "/var/git/repositories/" .. current_repo .. ".git" ) + for repo in current_repos:gmatch( "%S+" ) do + table.insert( cmd, "/var/git/repositories/" .. repo .. ".git" ) + end end end