问题描述:

When I run:

git difftool -d

It creates a temporary directory containing the files to be shown in the diff. The structure looks like this:

tmpdir/

left/

file1

lindex

right/

file1

rindex

The "left" and "right" directories are clear. But what are the "lindex" and "rindex" files? What do they contain? How can I view them? Sometimes there's no "rindex" but a "wtindex" file instead.

网友答案:

They represent indexes, generated by git update-index in git-difftool.perl#L224-L248.

  • lindex represents LOCAL: A temporary file containing the contents of the file on the current branch.
  • rindex represents REMOTE: A temporary file containing the contents of the file to be merged.
  • wtindex represented MERGED (working tree): the result of the merge in progress

Those indexes are updated using --index-info in order to facilitate the diff between any locale modification you will be doing for each file, and the three versions mentioned above.

相关阅读:
Top