diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-05-02 17:57:32 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-05-02 17:57:32 +0100 |
commit | bafa10b29eea6f9ab2993227dbc65e12ebe208cc (patch) | |
tree | e0949173b21efbbdd62ea25f4b604b6f48efec5a /bin | |
parent | 8aaeeedadca4445ef17d88f801759d77efa8dfe0 (diff) | |
download | gitano-bafa10b29eea6f9ab2993227dbc65e12ebe208cc.tar.gz |
BIN: post-receive hook notes that admin ref changes are applied
Diffstat (limited to 'bin')
-rw-r--r-- | bin/gitano-post-receive-hook | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/gitano-post-receive-hook b/bin/gitano-post-receive-hook index 18ad9f6..822fb7c 100644 --- a/bin/gitano-post-receive-hook +++ b/bin/gitano-post-receive-hook @@ -72,10 +72,19 @@ end -- a list of the refs updated and we get to react to that (such as sending -- emails, ensuring that new rules are applied, etc) -local fh = sio.stdin +local updates = {} for oldsha, newsha, refname in (sio.stdin:read("*a")):gmatch("([^ ]+) ([^ ]+) ([^\n]+)") do - gitano.log.ddebug(oldsha, newsha, refname) + gitano.log.ddebug("post-receive:", oldsha, newsha, refname) + updates[refname] = {oldsha, newsha, oldsha=oldsha, newsha=newsha} +end + +-- updates to refs/gitano/admin will *already* have been processed thanks +-- to the repository being found above. So if that's present, just note +-- that the updates (if any) will have been applied + +if updates["refs/gitano/admin"] then + gitano.log.chat("<" .. repo.name .. "> Any changes to admin ref have been applied.") end return 0 |