Might be a nice try, but Oops, I suspect.
Doesn't the presense of "if (!work_tree..." below tell you that the
function you are calling can legitimately return NULL?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html