aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org
diff options
context:
space:
mode:
authorKevin Sawicki <kevin@github.com>2012-02-29 10:29:05 -0800
committerChris Aniszczyk <zx@twitter.com>2012-03-05 21:06:35 -0800
commitfb2113d766e92cfc9196037aa44d361ae2233c6f (patch)
tree5407e1f8f3db13c432b68d729b3df274f6598a3a /org.eclipse.jgit.test/tst/org
parent9e4b4fc41c4220779a96afeca17c669f36945721 (diff)
downloadjgit-fb2113d766e92cfc9196037aa44d361ae2233c6f.tar.gz
jgit-fb2113d766e92cfc9196037aa44d361ae2233c6f.zip
Reuse Git object created in setUp
Removes unneeded calls to Git.wrap in test cases where a valid Git object already exists as an instance variable. Change-Id: Id0e032d7886dfa6a3288321503a02743413f707d Signed-off-by: Chris Aniszczyk <zx@twitter.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java
index 0b17972223..97d0efe109 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashApplyCommandTest.java
@@ -109,7 +109,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
File addedFile = writeTrashFile(addedPath, "content2");
git.add().addFilepattern(addedPath).call();
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertFalse(addedFile.exists());
@@ -134,7 +134,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
public void indexDelete() throws Exception {
git.rm().addFilepattern("file.txt").call();
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertEquals("content", read(committedFile));
@@ -158,7 +158,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
public void workingDirectoryModify() throws Exception {
writeTrashFile("file.txt", "content2");
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertEquals("content", read(committedFile));
@@ -187,7 +187,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
writeTrashFile(path, "content2");
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertEquals("content", read(subfolderFile));
@@ -213,7 +213,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
git.add().addFilepattern("file.txt").call();
writeTrashFile("file.txt", "content3");
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertEquals("content", read(committedFile));
@@ -240,7 +240,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
git.add().addFilepattern("file.txt").call();
writeTrashFile("file.txt", "content");
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertEquals("content", read(committedFile));
@@ -269,7 +269,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
FileUtils.delete(added);
assertFalse(added.exists());
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertFalse(added.exists());
@@ -296,7 +296,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
FileUtils.delete(committedFile);
assertFalse(committedFile.exists());
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertEquals("content", read(committedFile));
@@ -323,7 +323,7 @@ public class StashApplyCommandTest extends RepositoryTestCase {
File addedFile = writeTrashFile(addedPath, "content2");
git.add().addFilepattern(addedPath).call();
- RevCommit stashed = Git.wrap(db).stashCreate().call();
+ RevCommit stashed = git.stashCreate().call();
assertNotNull(stashed);
assertTrue(committedFile.exists());
assertFalse(addedFile.exists());