Fixed codacy warnings/errors.

This commit is contained in:
rlynch2
2016-11-04 13:04:57 -07:00
parent 09377f38b8
commit 588870ca5f
2 changed files with 15 additions and 6 deletions

View File

@@ -167,12 +167,12 @@ public class JGitEnvironmentRepository extends AbstractScmEnvironmentRepository
try {
git = createGitClient();
if (shouldPull(git)) {
fetch(git, label);
//checkout after fetch so we can get any new branches, tags, ect.
fetch(git, label);:wQ
//checkout after fetch so we can get any new branches, tags, ect.
checkout(git, label);
if(isBranch(git, label)) {
//merge results from fetch
merge(git, label);
//merge results from fetch
merge(git, label);
if (!isClean(git)) {
logger.warn("The local repository is dirty. Resetting it to origin/"
+ label + ".");
@@ -181,7 +181,7 @@ public class JGitEnvironmentRepository extends AbstractScmEnvironmentRepository
}
}
else{
//nothing to update so just checkout
//nothing to update so just checkout
checkout(git, label);
}
//always return what is currently HEAD as the version

View File

@@ -22,7 +22,16 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.jgit.api.*;
import org.eclipse.jgit.api.CheckoutCommand;
import org.eclipse.jgit.api.CloneCommand;
import org.eclipse.jgit.api.FetchCommand;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.ListBranchCommand;
import org.eclipse.jgit.api.MergeCommand;
import org.eclipse.jgit.api.ResetCommand;
import org.eclipse.jgit.api.Status;
import org.eclipse.jgit.api.StatusCommand;
import org.eclipse.jgit.api.errors.InvalidRemoteException;
import org.eclipse.jgit.api.errors.NotMergedException;
import org.eclipse.jgit.lib.ObjectId;