aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2019-02-25 08:24:19 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2019-02-25 11:05:42 +0900
commit6305869bf16bc879941a932e3f03a9bae2822269 (patch)
tree8f6cc7909e101c40f7402d975373e2ffbf570c87
parente4fdca7355630af0103d0ef34f8a5a995aa62ced (diff)
downloadjgit-6305869bf16bc879941a932e3f03a9bae2822269.tar.gz
jgit-6305869bf16bc879941a932e3f03a9bae2822269.zip
FS_POSIX: Externalize log message
Change-Id: Ida538e05c4595fdce99f1fa87469a3be60160adb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r--org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java5
3 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
index 1366031be0..383e4c290b 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -735,6 +735,7 @@ unexpectedEndOfConfigFile=Unexpected end of config file
unexpectedEndOfInput=Unexpected end of input
unexpectedEofInPack=Unexpected EOF in partially created pack
unexpectedHunkTrailer=Unexpected hunk trailer
+unexpectedNlinkValue=nlink of link to lock file {0} was not 2 but {1}
unexpectedOddResult=odd: {0} + {1} - {2}
unexpectedPacketLine=unexpected {0}
unexpectedRefReport={0}: unexpected ref report: {1}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
index 7dce43a71c..e30fa080e6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
@@ -795,6 +795,7 @@ public class JGitText extends TranslationBundle {
/***/ public String unexpectedEndOfInput;
/***/ public String unexpectedEofInPack;
/***/ public String unexpectedHunkTrailer;
+ /***/ public String unexpectedNlinkValue;
/***/ public String unexpectedOddResult;
/***/ public String unexpectedPacketLine;
/***/ public String unexpectedRefReport;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java
index 0e1e60f275..d8298cc6d5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java
@@ -400,8 +400,9 @@ public class FS_POSIX extends FS {
Integer nlink = (Integer) (Files.getAttribute(lockPath,
"unix:nlink")); //$NON-NLS-1$
if (nlink > 2) {
- LOG.warn("nlink of link to lock file {} was not 2 but {}", //$NON-NLS-1$
- lock.getPath(), nlink);
+ LOG.warn(MessageFormat.format(
+ JGitText.get().unexpectedNlinkValue, lock.getPath(),
+ nlink));
return false;
} else if (nlink < 2) {
supportsUnixNLink = false;