From: Junio C Hamano Date: Tue, 11 Mar 2008 02:41:33 GMT Subject: "git diff-index" broken in 'next' Message-ID: <7vk5kagexu.fsf_-_@gitster.siamese.dyndns.org> In-Reply-To: When you are in the middle of conflicted merge, it is useful to view "git diff" that compares the stage #2 and your work tree (which has conflict markers and both sides of the changes). This still works. However, with the unpack_trees() update, another form of useful sanity check seems to be totally broken: $ git diff HEAD -- $conflicted_file This used to show the diff between the HEAD and the work tree, but not anymore. It shows a diff as if the whole file is gone, and that is because diff-lib.c::oneway_diff() gets idx==NULL from the caller for unmerged entries. It never reaches show_modified() codepath. I think it is somewhere around ll. 280 in unpack_callback() that causes this, but I don't have time to dig this further for now.