From 6305869bf16bc879941a932e3f03a9bae2822269 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 25 Feb 2019 08:24:19 +0900 Subject: [PATCH] FS_POSIX: Externalize log message Change-Id: Ida538e05c4595fdce99f1fa87469a3be60160adb Signed-off-by: David Pursehouse --- .../resources/org/eclipse/jgit/internal/JGitText.properties | 1 + org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java | 1 + org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java | 5 +++-- 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 1366031be..383e4c290 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 7dce43a71..e30fa080e 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 0e1e60f27..d8298cc6d 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;