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.
git diff origin/master
Use work_dir option to let the user pass the work_tree as arg
This may help in specific cases e.g. when we want to issue a diff
request like "git diff origin/master" for a repository in a different
folder than the PWD.
Fix spec to take into account the new work_dir option
@rtomayko any chance this to get merged :)?
Grit is no longer maintained. See #183 and check out libgit2/rugged.