From b36cd8a68e82013372c2b1bbd4cf24f69fc093c5 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Wed, 9 May 2012 13:47:24 +0200 Subject: [PATCH] Pass through :is_bare option from wiki_options, allows Gollum to work with gitolite --- lib/gollum/git_access.rb | 4 ++-- lib/gollum/wiki.rb | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/gollum/git_access.rb b/lib/gollum/git_access.rb index 7e67010b..81213f04 100644 --- a/lib/gollum/git_access.rb +++ b/lib/gollum/git_access.rb @@ -9,10 +9,10 @@ module Gollum # page_file_dir - String the directory in which all page files reside # # Returns this instance. - def initialize(path, page_file_dir = nil) + def initialize(path, page_file_dir = nil, bare = false) @page_file_dir = page_file_dir @path = path - @repo = Grit::Repo.new(path) + @repo = Grit::Repo.new(path, { :is_bare => bare }) clear end diff --git a/lib/gollum/wiki.rb b/lib/gollum/wiki.rb index deb97c52..14edecb1 100644 --- a/lib/gollum/wiki.rb +++ b/lib/gollum/wiki.rb @@ -151,8 +151,9 @@ module Gollum path = path.path end @path = path + @repo_is_bare = options[:repo_is_bare] @page_file_dir = options[:page_file_dir] - @access = options[:access] || GitAccess.new(path, @page_file_dir) + @access = options[:access] || GitAccess.new(path, @page_file_dir, @repo_is_bare) @base_path = options[:base_path] || "/" @page_class = options[:page_class] || self.class.page_class @file_class = options[:file_class] || self.class.file_class