]> source.dussan.org Git - jgit.git/commitdiff
PushCommandTest: Remove unused variables to prevent errors in Eclipse 97/90697/1
authorDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 9 Feb 2017 06:09:39 +0000 (15:09 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 9 Feb 2017 06:10:15 +0000 (15:10 +0900)
Change-Id: Ie656b18fb151bf1e3c2dcc0438a77e32102991c2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java

index eaf64b649f0b4ec1756da898f3b7d15286bbe1aa..8c613ec4883a4c5705218d94873695cf1455914d 100644 (file)
@@ -400,7 +400,7 @@ public class PushCommandTest extends RepositoryTestCase {
                try (Git git1 = new Git(db)) {
                        // create one commit and push it
                        RevCommit commit = git1.commit().setMessage("initial commit").call();
-                       Ref branchRef = git1.branchCreate().setName("initial").call();
+                       git1.branchCreate().setName("initial").call();
 
                        RefSpec spec = new RefSpec("refs/heads/master:refs/heads/x");
                        git1.push().setRemote("test").setRefSpecs(spec)
@@ -410,7 +410,7 @@ public class PushCommandTest extends RepositoryTestCase {
                                        db2.resolve(commit.getId().getName() + "^{commit}"));
                        //now try to force-push a new commit, with a good lease
 
-                       RevCommit commit2 = git1.commit().setMessage("second commit").call();
+                       git1.commit().setMessage("second commit").call();
                        Iterable<PushResult> results =
                                        git1.push().setRemote("test").setRefSpecs(spec)
                                                        .setRefLeaseSpecs(new RefLeaseSpec("refs/heads/x", "initial"))
@@ -420,7 +420,7 @@ public class PushCommandTest extends RepositoryTestCase {
                                assertEquals(update.getStatus(), RemoteRefUpdate.Status.OK);
                        }
 
-                       RevCommit commit3 = git1.commit().setMessage("third commit").call();
+                       git1.commit().setMessage("third commit").call();
                        //now try to force-push a new commit, with a bad lease
 
                        results =