DirCacheCheckout: create only one ObjectReader

This deprecated method accidentally creates two ObjectReader
instances. Use the instance created one line above that is
correctly released in the finally block.

Change-Id: Ic57d041674611802a9384d8fa1d292e821055019
This commit is contained in:
Shawn Pearce 2014-11-24 11:38:09 -08:00 committed by Shawn Pearce
parent b2f0fd03d8
commit 6814728a82
1 changed files with 1 additions and 1 deletions

View File

@ -1170,7 +1170,7 @@ public static void checkoutEntry(final Repository repository, File f,
DirCacheEntry entry) throws IOException {
ObjectReader or = repository.newObjectReader();
try {
checkoutEntry(repository, f, entry, repository.newObjectReader());
checkoutEntry(repository, f, entry, or);
} finally {
or.release();
}