merge patch from Joey Hess into working tree