support for bare repositories

This commit is contained in:
Tomasz Gieniusz 2013-02-05 15:15:47 +01:00
parent c3aff444fc
commit 768b1c1c8d

View file

@ -18,7 +18,7 @@ module GitStats
def validate_repo_path(repo_path) def validate_repo_path(repo_path)
raise ArgumentError, "#{repo_path} is not a git repository" unless Dir.exists?("#{repo_path}/.git") raise ArgumentError, "#{repo_path} is not a git repository" unless (Dir.exists?("#{repo_path}/.git") || File.exists?("#{repo_path}/HEAD"))
end end
end end