lib/github-status/support/git.rb in concourse-github-status-0.5.11 vs lib/github-status/support/git.rb in concourse-github-status-0.6.2
- old
+ new
@@ -15,10 +15,14 @@
abort
end
Contract None => String
def sha
- @sha ||= git.revparse 'HEAD'
+ @sha ||= if File.file? "#{workdir}/#{path}"
+ File.read("#{workdir}/#{path}").chomp
+ else
+ git.revparse 'HEAD'
+ end
end
end
end
end