]> source.dussan.org Git - jgit.git/commitdiff
Merge branch 'stable-4.11' into stable-5.0 50/128950/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 8 Sep 2018 09:06:28 +0000 (11:06 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 8 Sep 2018 09:09:27 +0000 (11:09 +0200)
* stable-4.11:
  Fix atomic lock file creation on NFS
  Use constant for ".lock"
  Fix handling of option core.supportsAtomicCreateNewFile
  GC: Avoid logging errors when deleting non-empty folders

Change-Id: Ifcc8bfab4fd05c18a08dd82588860dffd0e6d726
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
1  2 
org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java

index 0000000000000000000000000000000000000000,48051e14fbaf78a4b69a49e88b4e1d6d7c526972..803a29a5ec6c63d9b2a3cc826c7f75fe44353a7d
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,38 +1,29 @@@
 -                <message_argument value="4.11.2"/>
 -                <message_argument value="4.11.0"/>
 -            </message_arguments>
 -        </filter>
 -    </resource>
 -    <resource path="src/org/eclipse/jgit/lib/Constants.java" type="org.eclipse.jgit.lib.Constants">
 -        <filter id="1141899266">
 -            <message_arguments>
 -                <message_argument value="4.8"/>
 -                <message_argument value="4.11"/>
 -                <message_argument value="LOCK_SUFFIX"/>
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+ <component id="org.eclipse.jgit" version="2">
+     <resource path="META-INF/MANIFEST.MF">
+         <filter id="924844039">
+             <message_arguments>
 -                <message_argument value="4.11"/>
++                <message_argument value="5.0.3"/>
++                <message_argument value="5.0.0"/>
+             </message_arguments>
+         </filter>
+     </resource>
+     <resource path="src/org/eclipse/jgit/util/FS.java" type="org.eclipse.jgit.util.FS">
+         <filter id="1141899266">
+             <message_arguments>
+                 <message_argument value="4.7"/>
 -                <message_argument value="4.11"/>
++                <message_argument value="5.0"/>
+                 <message_argument value="createNewFileAtomic(File)"/>
+             </message_arguments>
+         </filter>
+     </resource>
+     <resource path="src/org/eclipse/jgit/util/FS.java" type="org.eclipse.jgit.util.FS$LockToken">
+         <filter id="1141899266">
+             <message_arguments>
+                 <message_argument value="4.7"/>
++                <message_argument value="5.0"/>
+                 <message_argument value="LockToken"/>
+             </message_arguments>
+         </filter>
+     </resource>
+ </component>
index 576d0c7699f60293a3d4a17d1bff42801f15ec89,3f845556e1ae2d564b45b71ce8b331da4efb307f..eaaf7f01bb1556ee6e480d4310c08acdfb32524b
@@@ -729,8 -723,8 +731,9 @@@ unknownObjectType=Unknown object type {
  unknownObjectType2=unknown
  unknownRepositoryFormat=Unknown repository format
  unknownRepositoryFormat2=Unknown repository format "{0}"; expected "0".
 +unknownTransportCommand=unknown command {0}
  unknownZlibError=Unknown zlib error.
+ unlockLockFileFailed=Unlocking LockFile ''{0}'' failed
  unmergedPath=Unmerged path: {0}
  unmergedPaths=Repository contains unmerged paths
  unpackException=Exception while parsing pack stream
index a52fab926a3f72dd2520d9bd9ba16fd04460ef83,d3514344d8eabe01db8cbaef25a958f26e525ed1..5776ef2112d0f3ef9cb89d1f32d9047f64cdb035
@@@ -790,8 -784,8 +792,9 @@@ public class JGitText extends Translati
        /***/ public String unknownObjectType2;
        /***/ public String unknownRepositoryFormat;
        /***/ public String unknownRepositoryFormat2;
 +      /***/ public String unknownTransportCommand;
        /***/ public String unknownZlibError;
+       /***/ public String unlockLockFileFailed;
        /***/ public String unmergedPath;
        /***/ public String unmergedPaths;
        /***/ public String unpackException;
index 3abf4dc5e5499dd0b9d2182b8e9b74ef2de4ee3b,45237c42bea621058eca71e86a962929e79abbad..8795329bf92ee1eaa6e50ee519b88c68e261db72
@@@ -383,15 -391,19 +391,19 @@@ public class FS_POSIX extends FS 
                        return true;
                }
                Path lockPath = lock.toPath();
-               Path link = Files.createLink(Paths.get(lock.getAbsolutePath() + ".lnk"), //$NON-NLS-1$
-                               lockPath);
+               Path link = null;
                try {
+                       link = Files.createLink(
+                                       Paths.get(lock.getAbsolutePath() + ".lnk"), //$NON-NLS-1$
+                                       lockPath);
                        Integer nlink = (Integer) (Files.getAttribute(lockPath,
                                        "unix:nlink")); //$NON-NLS-1$
-                       if (nlink != 2) {
+                       if (nlink > 2) {
 -                              LOG.warn("nlink of link to lock file {0} was not 2 but {1}", //$NON-NLS-1$
 +                              LOG.warn("nlink of link to lock file {} was not 2 but {}", //$NON-NLS-1$
                                                lock.getPath(), nlink);
                                return false;
+                       } else if (nlink < 2) {
+                               supportsUnixNLink = false;
                        }
                        return true;
                } catch (UnsupportedOperationException | IllegalArgumentException e) {