def root
      @root ||= begin
                  out = `git rev-parse --show-toplevel 2>&1`.strip

                  if $?.success? && !out.empty?
                    Pathname.new(out)
                  else
                    raise EY::Repo::NotAGitRepository.new(out)
                  end
                end
    end
def root
      @root ||= begin
                  out = `git rev-parse --show-toplevel 2>&1`.strip

                  if $?.success? && !out.empty?
                    Pathname.new(out)
                  else
                    raise EY::Repo::NotAGitRepository.new(out)
                  end
                end
    end
$GIT_DIR is what git uses to override the location of the .git dir.
 $GIT_WORK_TREE is the working tree for git, which we'll use after $GIT_DIR.

 We use this to specify which repo we should look at, since it would also
 specify where any git commands are directed, thus fooling commands we
 run anyway.