edx/diff-cover — pull request #96 by Bachmann1234 (2014-06-30 02:23:24+00:00)
Title: subprocess returns binary types, this is bad as diff-cover tends to use unicode

I am mildy concerned with this fix as my diff-cover has taught me that even with python3 encoding is hard....

OK so here is the issue

https://github.com/edx/diff-cover/issues/94

When diff-cover tries to root_rel_path

```
root_rel_path = os.path.relpath(cls._cwd, cls._root)
```

cls._cwd is passed in as unicode while cls._root is grabbed from the subprocess call.

Subprocess returns bytes, mixing bytes and unicode is BAD.

Now usually encoding from subprocess is tricky work because "Whats the dang encoding?!" but....
https://www.kernel.org/pub/software/scm/git/docs/git-rev-list.html

>--encoding[=]
The commit objects record the encoding used for the log message in their encoding header; this option can be used to tell the command to re-code the commit log message in the encoding preferred by the user. For non plumbing commands this defaults to UTF-8.

So I should be able to just decode utf-8... right?

This fix rasies other issues.

1. How do I add a test for this?
2. Is there anywhere else we make this or a similar mistake.
3. In this example I am trying to fix do we ever pass cwd as bytes?