summaryrefslogtreecommitdiff
path: root/bin/gitano-update-hook
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gitano-update-hook')
-rw-r--r--bin/gitano-update-hook12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/gitano-update-hook b/bin/gitano-update-hook
index a588f6a..de42593 100644
--- a/bin/gitano-update-hook
+++ b/bin/gitano-update-hook
@@ -119,9 +119,11 @@ end
-- First, populate gitano/starttree and gitano/targettree
local function set_list(tag, entries)
- table.sort(entries)
- entries[#entries+1] = ""
- context[tag] = table.concat({"", unpack(entries)}, "\0")
+ -- Make the set for direct string tests
+ for i = 1, #entries do
+ entries[entries[i]] = true
+ end
+ context[tag] = entries
end
local function populate_tree(tag, tree)
@@ -133,8 +135,8 @@ local function populate_tree(tag, tree)
set_list(tag, names)
end
-populate_tree("starttree", oldtree)
-populate_tree("targettree", newtree)
+populate_tree("start_tree", oldtree)
+populate_tree("target_tree", newtree)
-- Now gitano/treedelta
local delta = oldtree:diff_to(newtree)