summaryrefslogtreecommitdiff
path: root/bin/gitano-update-hook.in
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-09-08 23:03:45 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-09-08 23:04:43 +0100
commit42ea9108d73e0d1fb415892879c10dd37235c6b7 (patch)
treea4f18fa6aa926991f5abbcfa44edfe24fecd4345 /bin/gitano-update-hook.in
parentd068d64d01dbfad2162ce5c31474d868f418e32c (diff)
downloadgitano-42ea9108d73e0d1fb415892879c10dd37235c6b7.tar.gz
GITANO: Migrate from gitano.git to gall
Diffstat (limited to 'bin/gitano-update-hook.in')
-rw-r--r--bin/gitano-update-hook.in13
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/gitano-update-hook.in b/bin/gitano-update-hook.in
index dd81649..446393a 100644
--- a/bin/gitano-update-hook.in
+++ b/bin/gitano-update-hook.in
@@ -11,6 +11,7 @@
-- @@GITANO_LUA_PATH
local gitano = require "gitano"
+local gall = require "gall"
local luxio = require "luxio"
local sio = require "luxio.simple"
local sp = require "luxio.subprocess"
@@ -35,7 +36,7 @@ local source = luxio.getenv("GITANO_SOURCE") or "ssh"
-- Now load the administration data
gitano.config.repo_path(repo_root)
-local admin_repo = gitano.git.repository.new((repo_root or "") .. "/gitano-admin.git")
+local admin_repo = gall.repository.new((repo_root or "") .. "/gitano-admin.git")
if not admin_repo then
gitano.log.fatal("Unable to locate administration repository. Cannot continue");
@@ -112,7 +113,7 @@ local function do_expensive_populate_context(context)
local oldtree, newtree
if oldsha == nullsha then
- oldtree = repo.git:get(gitano.git.tree.empty_sha).content
+ oldtree = repo.git:get(gall.tree.empty_sha).content
else
local thing = repo.git:get(oldsha)
if thing.type == "tag" then
@@ -121,13 +122,13 @@ local function do_expensive_populate_context(context)
if thing.type == "commit" then
oldtree = thing.content.tree.content
else
- oldtree = repo.git:get(gitano.git.tree.empty_sha).content
+ oldtree = repo.git:get(gall.tree.empty_sha).content
gitano.log.warn("Odd, old object", oldsha, "is not a commit or tag")
end
end
if newsha == nullsha then
- newtree = repo.git:get(gitano.git.tree.empty_sha).content
+ newtree = repo.git:get(gall.tree.empty_sha).content
else
local thing = repo.git:get(newsha)
if thing.type == "tag" then
@@ -136,7 +137,7 @@ local function do_expensive_populate_context(context)
if thing.type == "commit" then
newtree = thing.content.tree.content
else
- newtree = repo.git:get(gitano.git.tree.empty_sha).content
+ newtree = repo.git:get(gall.tree.empty_sha).content
gitano.log.warn("Odd, new object", oldsha, "is not a commit or tag")
end
end
@@ -152,7 +153,7 @@ local function do_expensive_populate_context(context)
end
local function populate_tree(tag, tree)
- local flat_tree = gitano.git.tree.flatten(tree)
+ local flat_tree = gall.tree.flatten(tree)
local names = {}
for fn in pairs(flat_tree) do
names[#names+1] = fn