Slight optimisations...
- only create a new GitAccess object if the wiki does not have a @page_file_dir directive - memoize the new GitAccess object
This commit is contained in:
+3
-2
@@ -686,8 +686,9 @@ module Gollum
|
||||
#
|
||||
# Returns an Array of BlobEntry instances.
|
||||
def tree_map_for(ref, ignore_page_file_dir=false)
|
||||
if ignore_page_file_dir
|
||||
GitAccess.new(path, nil, @repo_is_bare).tree(ref)
|
||||
if ignore_page_file_dir && !@page_file_dir.nil?
|
||||
@root_access ||= GitAccess.new(path, nil, @repo_is_bare)
|
||||
@root_access.tree(ref)
|
||||
else
|
||||
@access.tree(ref)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user