class SimpleCov::Formatter::JSONFormatter::ResultHashFormatter
def git_commit
coverage.json. stderr is captured (not forwarded) so a non-git project
matters most when `source_in_json false` drops the source text from
can recover the exact source a report was generated against, which
project isn't a git checkout or git isn't on PATH. Recorded so tools
Full git commit SHA of `SimpleCov.root`'s HEAD, or nil when the
def git_commit output, status = Open3.capture2e("git", "-C", SimpleCov.root.to_s, "rev-parse", "HEAD") status.success? ? output.strip : nil rescue StandardError nil end