Преглед на файлове

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 години
родител
ревизия
9ec97688b9
променени са 1 файла, в които са добавени 0 реда и са изтрити 1 реда
  1. 0
    1
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java

+ 0
- 1
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java Целия файл

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

Loading…
Отказ
Запис