support for bare repositories

This commit is contained in:
Tomasz Gieniusz 2013-02-05 15:15:47 +01:00
parent c3aff444fc
commit 768b1c1c8d
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ module GitStats
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