Skip to content

Commit

Permalink
explicitly drop support for git < 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wuputah committed Jan 22, 2011
1 parent 814f692 commit ef311cd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions extras/big_tuna/vcs/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.supported?
rescue BigTuna::Runner::Error => e
@_supported = false
end
@_supported
@_supported &&= self.class.version_at_least?("1.5.1")
end

def self.version_at_least?(version)
Expand All @@ -31,11 +31,7 @@ def self.version_at_least?(version)

def head_info
info = {}
if self.class.version_at_least?("1.5.1")
command = "git log --max-count=1 --pretty=format:%H%n%an%n%ae%n%ad%n%s #{self.branch}"
else
command = "git log --max-count=1 --format=\"%H%n%an%n%ae%n%ad%n%s\" #{self.branch}"
end
command = "git log --max-count=1 --pretty=format:%H%n%an%n%ae%n%ad%n%s #{self.branch}"
begin
output = BigTuna::Runner.execute(self.source, command)
rescue BigTuna::Runner::Error => e
Expand Down

0 comments on commit ef311cd

Please sign in to comment.