Skip to content

Commit

Permalink
Be more consistent. Dang I should branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
todb committed Oct 18, 2013
1 parent 3e08831 commit 2f2860f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions msf-gitprep.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GitInfo
attr_reader :origin_url, :repo, :uri_handler

def initialize
set_origin
set_origin_url
set_repo
set_uri_handler
end
Expand All @@ -36,7 +36,7 @@ def remote_v
@remote_v ||= %x{git remote -v}
end

def set_origin
def set_origin_url
remote_v =~ /^origin(.*)\(push\)$/
@origin_url = $1.strip
end
Expand All @@ -55,7 +55,7 @@ def set_uri_handler
end

def add_upstream
return if @remote_v =~ /upstream\s.*github\.com\/rapid7\/#{@repo}/
return if @remote_v =~ /upstream\s.*rapid7\/#{@repo}/
puts "Adding upstream repo."
%x{git remote add upstream #{@uri}rapid7/#{@repo}}
end
Expand Down

0 comments on commit 2f2860f

Please sign in to comment.