Permalink
Browse files

Support bare repos as well

  • Loading branch information...
1 parent 556c447 commit 129ce9332ed39640f91a42d82e3e025243f8b919 @scotchi committed May 21, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/gitfeed.rb
View
@@ -28,7 +28,11 @@ class Gitfeed
# Include diffs in the RSS output
def initialize(repository_path, options = {})
- @git = Git.open(repository_path)
+ if File.exists? "#{repository_path}/.git"
+ @git = Git.open(repository_path)
+ else
+ @git = Git.bare(repository_path)
+ end
@title = options[:title] || "Gitfeed for #{repository_path.sub(/.*\//, '')}"
@url = options[:url] || 'http://github.com/scotchi/gitfeed'
@description = options[:description] || repository_path

0 comments on commit 129ce93

Please sign in to comment.