Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #16 from nahi/check_branch_existence

Check branch existence
  • Loading branch information...
commit 30c2eb121d706f2a77f70d7db999f247e640af37 2 parents a9debf9 + b31d206
@igrigorik authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/bugspots/scanner.rb
View
3  lib/bugspots/scanner.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.