Browse Source

Do not create files to be updated before checkout of DirCache entry

DirCacheCheckout.checkoutEntry() prepares the new file content using a
temporary file and then renames it to the file to be written during
checkout. For files to be updated checkout() created each file before
calling checkoutEntry(). Hence renaming the temporary file always
failed which was corrected in exception handling by retrying to rename
the file after deleting the just newly created file.

Change-Id: I219f864f2ed8d68051d7b5955d0659964fa27274
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
tags/v0.11.1
Matthias Sohn 13 years ago
parent
commit
9ec97688b9

+ 0
- 1
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java View File

@@ -422,7 +422,6 @@ public class DirCacheCheckout {
if (!file.getParentFile().mkdirs()) {
// ignore
}
file.createNewFile();
DirCacheEntry entry = dc.getEntry(path);
checkoutEntry(repo, file, entry);
}

Loading…
Cancel
Save