Use --work-tree in 'native' git method #162

wants to merge 2 commits into


None yet

2 participants

alup commented Apr 2, 2013

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.

alup added some commits Apr 2, 2013
@alup alup 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.
@alup alup Fix spec to take into account the new work_dir option e97f137
alup commented Apr 18, 2013

@rtomayko any chance this to get merged :)?

bkeepers commented Feb 3, 2014

Grit is no longer maintained. See #183 and check out libgit2/rugged.

@bkeepers bkeepers closed this Feb 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment