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:
parent
b2f0fd03d8
commit
6814728a82
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue