mojombo/grit — pull request #162 by alup (2013-04-02 11:59:05+00:00)
Title: Use --work-tree in 'native' git method

There are cases like e.g. when we want to `git diff origin/master` to inspect the changes between the local working directory and another commit/head/whatever, in which the command is executed in a folder other than the repository's one. So, even if the `--git-dir` argument is passed correctly the working directory is not identified as it should and the working dir diff is returned taking into account the PWD. This is fixed by passing the `--work-tree` parameter with the correct value to the git options.