Except that this fixes a longstanding corner case bug by
tightening the way underlying diff-index command is run, it is
functionally equivalent to the scripted version.
Signed-off-by: Thomas Harning Jr <harningt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>