old_contents: """
  Converter for `git diff` paths
  """
  from __future__ import unicode_literals
  import os
  import six
  import subprocess
  
  
  class GitPathTool(object):
      """
      Converts `git diff` paths to absolute paths or relative paths to cwd.
      """
  
      def __init__(self, cwd):
          """
          Initialize the absolute path to the git project
          """
          if isinstance(cwd, six.binary_type):
              cwd = cwd.decode()
          self._cwd = cwd
          self._root = self._git_root()
  
      def relative_path(self, git_diff_path):
          """
          Returns git_diff_path relative to cwd.
          """
          # Remove git_root from src_path for searching the correct filename
          # If cwd is `/home/user/work/diff-cover/diff_cover`
          # and src_path is `diff_cover/violations_reporter.py`
          # search for `violations_reporter.py`
          root_rel_path = os.path.relpath(self._cwd, self._root)
          if isinstance(root_rel_path, six.binary_type):
              root_rel_path = root_rel_path.decode()
          rel_path = os.path.relpath(git_diff_path, root_rel_path)
          if isinstance(rel_path, six.binary_type):
              rel_path = rel_path.decode()
          return rel_path
  
      def absolute_path(self, src_path):
          """
          Returns absoloute git_diff_path
          """
          # If cwd is `/home/user/work/diff-cover/diff_cover`
          # and src_path is `other_package/some_file.py`
          # search for `/home/user/work/diff-cover/other_package/some_file.py`
          return os.path.join(self._root, src_path)
  
      def _git_root(self):
          """
          Returns the output of `git rev-parse --show-toplevel`, which
          is the absolute path for the git project root.
          """
          command = ['git', 'rev-parse', '--show-toplevel']
          process = subprocess.Popen(command,
                                     stdout=subprocess.PIPE,
                                     stderr=subprocess.PIPE)
          stdout, stderr = process.communicate()
  
          return stdout.strip()
  
  
new_contents: """
  Converter for `git diff` paths
  """
  from __future__ import unicode_literals
  import os
  import six
  import subprocess
  
  
  class GitPathTool(object):
      """
      Converts `git diff` paths to absolute paths or relative paths to cwd.
      """
  
      def __init__(self, cwd):
          """
          Initialize the absolute path to the git project
          """
          self._cwd = self._decode(cwd)
          self._root = self._decode(self._git_root())
  
      def relative_path(self, git_diff_path):
          """
          Returns git_diff_path relative to cwd.
          """
          # Remove git_root from src_path for searching the correct filename
          # If cwd is `/home/user/work/diff-cover/diff_cover`
          # and src_path is `diff_cover/violations_reporter.py`
          # search for `violations_reporter.py`
          root_rel_path = os.path.relpath(self._cwd, self._root)
          root_rel_path = self._decode(root_rel_path)
          rel_path = os.path.relpath(git_diff_path, root_rel_path)
          rel_path = self._decode(rel_path)
          return rel_path
  
      def absolute_path(self, src_path):
          """
          Returns absoloute git_diff_path
          """
          # If cwd is `/home/user/work/diff-cover/diff_cover`
          # and src_path is `other_package/some_file.py`
          # search for `/home/user/work/diff-cover/other_package/some_file.py`
  
          return os.path.join(self._root, src_path)
  
      def _git_root(self):
          """
          Returns the output of `git rev-parse --show-toplevel`, which
          is the absolute path for the git project root.
          """
          command = ['git', 'rev-parse', '--show-toplevel']
          process = subprocess.Popen(command,
                                     stdout=subprocess.PIPE,
                                     stderr=subprocess.PIPE)
          stdout, stderr = process.communicate()
  
          return stdout.strip()
  
      @classmethod
      def _decode(cls, string):
          if isinstance(string, six.binary_type):
              return string.decode()
          return string
  
  
subject: Fix build for python3 *Decode all occuring strings in git_path.py