Permalink
Browse files

Merge pull request #16 from nahi/check_branch_existence

Check branch existence
  • Loading branch information...
igrigorik committed Jan 11, 2012
2 parents a9debf9 + b31d206 commit 30c2eb121d706f2a77f70d7db999f247e640af37
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/bugspots/scanner.rb
View
@@ -7,6 +7,9 @@ module Bugspots
def self.scan(repo, branch = "master", depth = 500, words = nil)
repo = Grit::Repo.new(repo)
+ unless repo.branches.find { |e| e.name == branch }
+ raise ArgumentError, "no such branch in the repo: #{branch}"
+ end
fixes = []
if words

0 comments on commit 30c2eb1

Please sign in to comment.