Closed daformat closed 7 years ago
I didn't know that git diff
worked outside of git repositories, but I guess that makes sense. The problem was that git diff
exits with a code of 1
when you do that, even though it renders the diff. Since the exit code indicates an error, pretty-diff
just prints out stderr
from git diff
, but in this case stderr
is empty.
I've updated pretty-diff
to handle this odd case and release v0.6.1.
Yeah, I just got the notification and saw the 'hack' you had to pull of your hat :) Thanks for fixing this so quickly!
So, git diff works pretty much without any trouble when you pass it local files that are from in non git versioned folders. Trying to get the same result with pretty-diff is a total fail.
Here is the git diff commands I'm using on a non git folder (working and giving the same result, which is expected)
All of these commands perfectly produces a colored word-diff, and works on non git initialized folders:
I get absolutely no result when trying the same thing with pretty-diff. Is there any configuration option I'm missing somewhere? I thought pretty-diff just "carried out" the args to git diff and expected to work out-of-the-box from what the README states "Simply use pretty-diff the same way you use git diff". Here is a screenshot:
I also tried inserting "diff" between pretty-diff and the rest of the args but it returns "error: not a git repository".