summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2016-01-20 09:32:19 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2016-01-20 09:45:48 +0900
commitaca07fac464834611bab83b91e828308838f361c (patch)
treed2075304ea161f9a02e4f874b67ca7db8501499c /org.eclipse.jgit
parent2ccea7f05a0f3e783f6a8fa3f07cc5f1001bc950 (diff)
parent4b93de43bafd419b973ebf242e4ca1dd3b3b87d1 (diff)
downloadjgit-aca07fac464834611bab83b91e828308838f361c.tar.gz
jgit-aca07fac464834611bab83b91e828308838f361c.zip
Merge branch 'stable-4.2'
* stable-4.2: CheckoutCommandTest: Create Git instances in try-with-resource BranchCommandTest: Create Git instances in try-with-resource CheckoutTest: Create Git instances in try-with-resource BranchTest: Create Git instances in try-with-resource URIishTest: Use @Test annotation's `expected` argument Suppress "The allocated object is never used" warning in tests Add $NON-NLS to suppress "Non-externalized string literal" warnings Don't use deprecated constructors of CmdLineException Prepare 4.2.0-SNAPSHOT builds Remove org.eclipse.jgit.updatesite project from tools/version.sh RevParse: Remove superfluous semicolon RefUpdateTest: Use try-with-resource for auto-closable types RefUpdateTest: Add null check to prevent potential NPE CommitCommand: Remove redundant null check JGit v4.2.0.201512141825-rc1 Change-Id: I2179859289b2f2e3d0b7c6d02ef7e7890c467f7b Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
index 5b7d84f732..4f9a5a3178 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
@@ -179,7 +179,7 @@ public class CommitCommand extends GitCommand<RevCommit> {
processOptions(state, rw);
- if (all && !repo.isBare() && repo.getWorkTree() != null) {
+ if (all && !repo.isBare()) {
try (Git git = new Git(repo)) {
git.add()
.addFilepattern(".") //$NON-NLS-1$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
index 5ce39c2e03..3ee2feb140 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
@@ -715,7 +715,7 @@ public class URIish implements Serializable {
*/
public String getHumanishName() throws IllegalArgumentException {
String s = getPath();
- if ("/".equals(s) || "".equals(s)) //$NON-NLS-1$
+ if ("/".equals(s) || "".equals(s)) //$NON-NLS-1$ //$NON-NLS-2$
s = getHost();
if (s == null) // $NON-NLS-1$
throw new IllegalArgumentException();