diff options
author | Shawn Pearce <sop@google.com> | 2012-03-12 10:16:42 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2012-03-12 10:16:42 -0400 |
commit | 0a69f05647b05b89c969a7366bee541c0e985af3 (patch) | |
tree | d6113d20bf5094b5f794f91023bf9ba84c1c0c4a /org.eclipse.jgit.test | |
parent | 95ceb24866c02a49ee9e0dcf5d2617879e98527f (diff) | |
parent | 01ee87201f75cfd6de9e3f755c44f076f09059e7 (diff) | |
download | jgit-0a69f05647b05b89c969a7366bee541c0e985af3.tar.gz jgit-0a69f05647b05b89c969a7366bee541c0e985af3.zip |
Merge changes Ic0ee9c08,Ia3e82682,I8d8ab547,I8f2cd0a0,I45823b0c,Ie22ac47e
* changes:
cleanup: Silence an unused-parameter warning
cleanup: Get rid of some unused-warnings
cleanup: Remove unused parameter in ConsoleCredentialsProvider
cleanup: Drop unused parameter on DhtPackParser
cleanup: Remove unneeded parameter to private method in RefUpdateTest
cleanup: Remove unnecessary @SuppressWarnings
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java index 780fde3c61..cbdf23641e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java @@ -616,7 +616,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { ObjectId oldHead = db.resolve(Constants.HEAD); assertFalse("precondition for this test, branch b != HEAD", rb .equals(oldHead)); - writeReflog(db, rb, rb, "Just a message", "refs/heads/b"); + writeReflog(db, rb, "Just a message", "refs/heads/b"); assertTrue("log on old branch", new File(db.getDirectory(), "logs/refs/heads/b").exists()); RefRename renameRef = db.renameRef("refs/heads/b", @@ -640,7 +640,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { writeSymref(Constants.HEAD, "refs/heads/b"); ObjectId oldHead = db.resolve(Constants.HEAD); assertTrue("internal test condition, b == HEAD", rb.equals(oldHead)); - writeReflog(db, rb, rb, "Just a message", "refs/heads/b"); + writeReflog(db, rb, "Just a message", "refs/heads/b"); assertTrue("log on old branch", new File(db.getDirectory(), "logs/refs/heads/b").exists()); RefRename renameRef = db.renameRef("refs/heads/b", @@ -669,7 +669,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { Result update = updateRef.update(); assertEquals("internal check new ref is loose", Result.FORCED, update); assertEquals(Ref.Storage.LOOSE, db.getRef("refs/heads/b").getStorage()); - writeReflog(db, rb, rb, "Just a message", "refs/heads/b"); + writeReflog(db, rb, "Just a message", "refs/heads/b"); assertTrue("log on old branch", new File(db.getDirectory(), "logs/refs/heads/b").exists()); RefRename renameRef = db.renameRef("refs/heads/b", @@ -699,8 +699,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { writeSymref(Constants.HEAD, headPointsTo); ObjectId oldfromId = db.resolve(fromName); ObjectId oldHeadId = db.resolve(Constants.HEAD); - writeReflog(db, oldfromId, oldfromId, "Just a message", - fromName); + writeReflog(db, oldfromId, "Just a message", fromName); List<org.eclipse.jgit.storage.file.ReflogEntry> oldFromLog = db .getReflogReader(fromName).getReverseEntries(); List<org.eclipse.jgit.storage.file.ReflogEntry> oldHeadLog = oldHeadId != null ? db @@ -806,7 +805,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { assertEquals(Result.FAST_FORWARD, updateRef.update()); ObjectId oldHead = db.resolve(Constants.HEAD); assertTrue(rb.equals(oldHead)); // assumption for this test - writeReflog(db, rb, rb, "Just a message", "refs/heads/a"); + writeReflog(db, rb, "Just a message", "refs/heads/a"); assertTrue("internal check, we have a log", new File(db.getDirectory(), "logs/refs/heads/a").exists()); @@ -840,8 +839,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { assertEquals(Result.FORCED, updateRef.update()); ObjectId oldHead = db.resolve(Constants.HEAD); assertTrue(rb.equals(oldHead)); // assumption for this test - writeReflog(db, rb, rb, "Just a message", - "refs/heads/prefix/a"); + writeReflog(db, rb, "Just a message", "refs/heads/prefix/a"); assertTrue("internal check, we have a log", new File(db.getDirectory(), "logs/refs/heads/prefix/a").exists()); @@ -864,8 +862,8 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { "HEAD").getReverseEntries().get(0).getComment()); } - private void writeReflog(Repository db, ObjectId oldId, ObjectId newId, - String msg, String refName) throws IOException { + private void writeReflog(Repository db, ObjectId newId, String msg, + String refName) throws IOException { RefDirectory refs = (RefDirectory) db.getRefDatabase(); RefDirectoryUpdate update = refs.newUpdate(refName, true); update.setNewObjectId(newId); |