]> source.dussan.org Git - jgit.git/commit
IndexDiff: close SubmoduleWalk and use already loaded DirCache 63/151063/2
authorThomas Wolf <thomas.wolf@paranor.ch>
Mon, 14 Oct 2019 19:06:18 +0000 (21:06 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Tue, 15 Oct 2019 06:54:20 +0000 (08:54 +0200)
commit36e16435bed5ba457f6d709643acc93505e99d2c
tree9003f4d44cd7ae2252909bf08df0585706776b6f
parentd1d8bc30c213e6c416534a02921edada9d50cb25
IndexDiff: close SubmoduleWalk and use already loaded DirCache

If the SubModuleWalk isn't closed its TreeWalk's ObjectReader won't
be closed. Re-loading the DirCache during an IndexDiff is not only
inefficient but could also give strange results if an external
process had modified the index in the meantime: file diffs would
be based on a "before" state, but submodule diffs on an "after"
state.

Change-Id: Iab948c08ac342138b37263c9028d80b84101f6d6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java