summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-05-16 16:59:39 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-05-16 16:59:39 +0100
commit7deb33ef4d903a50ac62bd9f969cbb82f5a973bf (patch)
tree71d3a6aa90cf02d7a1d655e80bc5c5c590036bcb /bin
parent9ac57ad394af2de6fd2ca443b86bdab733c7b11f (diff)
downloadgitano-7deb33ef4d903a50ac62bd9f969cbb82f5a973bf.tar.gz
BIN: Fix up the update trees, we can defer them later
Diffstat (limited to 'bin')
-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)