schacon/ruby-git — pull request #78 by JordiPolo (2013-06-01 12:52:49+00:00)
Title: allow for making diff from the current working directory to HEAD

I wanted to get a patch with the changes I had in my working directory from HEAD.
It turns out that calling nil.to_s is causing to create a command like:
git diff "-p" "HEAD" "" 2>&1

This small change makes the nil survive till the where the command is created and it becomes
git diff "-p" "HEAD" 2>&1
which works as expected.