From 7deb33ef4d903a50ac62bd9f969cbb82f5a973bf Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Wed, 16 May 2012 16:59:39 +0100 Subject: BIN: Fix up the update trees, we can defer them later --- bin/gitano-update-hook | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bin') 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) -- cgit v1.2.1