From 24e26d13431cf0e97c6762a281a2c7c84cafea23 Mon Sep 17 00:00:00 2001 From: Andrew Oberstar Date: Wed, 26 Mar 2014 20:55:29 -0500 Subject: [PATCH] Cleaned up imports. --- .../groovy/org/ajoberstar/grgit/Repository.groovy | 2 ++ .../auth/JschAgentProxySessionFactory.groovy | 8 +++++--- .../ajoberstar/grgit/auth/TransportOpUtil.groovy | 1 + .../grgit/operation/BranchListOp.groovy | 1 - .../grgit/operation/BranchRemoveOp.groovy | 2 -- .../grgit/operation/BranchStatusOp.groovy | 2 +- .../ajoberstar/grgit/operation/CheckoutOp.groovy | 5 ----- .../org/ajoberstar/grgit/operation/CloneOp.groovy | 2 +- .../org/ajoberstar/grgit/operation/LogOp.groovy | 1 + .../org/ajoberstar/grgit/operation/PullOp.groovy | 1 - .../ajoberstar/grgit/operation/RevertOp.groovy | 2 -- .../ajoberstar/grgit/operation/TagAddOp.groovy | 2 +- .../ajoberstar/grgit/operation/TagListOp.groovy | 3 +-- .../ajoberstar/grgit/operation/TagRemoveOp.groovy | 2 -- .../ajoberstar/grgit/service/BranchService.groovy | 1 + .../grgit/service/RepositoryService.groovy | 1 - .../ajoberstar/grgit/service/TagService.groovy | 1 - .../org/ajoberstar/grgit/util/JGitUtil.groovy | 4 ++-- .../ajoberstar/grgit/auth/AuthConfigSpec.groovy | 4 ++-- .../grgit/auth/LinuxAuthenticationSpec.groovy | 10 +++++----- .../grgit/auth/MacAuthenticationSpec.groovy | 4 ++-- .../grgit/auth/WindowsAuthenticationSpec.groovy | 10 +++++----- .../ajoberstar/grgit/fixtures/GitTestUtil.groovy | 1 + .../grgit/fixtures/MultiGitOpSpec.groovy | 6 +++--- .../grgit/fixtures/SimpleGitOpSpec.groovy | 6 +++--- .../ajoberstar/grgit/operation/AddOpSpec.groovy | 8 -------- .../ajoberstar/grgit/operation/ApplyOpSpec.groovy | 8 -------- .../grgit/operation/BranchAddOpSpec.groovy | 14 +------------- .../grgit/operation/BranchChangeOpSpec.groovy | 14 +------------- .../grgit/operation/BranchListOpSpec.groovy | 15 +-------------- .../grgit/operation/BranchRemoveOpSpec.groovy | 14 +------------- .../grgit/operation/BranchStatusOpSpec.groovy | 14 +------------- .../grgit/operation/CheckoutOpSpec.groovy | 14 -------------- .../ajoberstar/grgit/operation/CleanOpSpec.groovy | 8 -------- .../ajoberstar/grgit/operation/CloneOpSpec.groovy | 10 ---------- .../grgit/operation/CommitOpSpec.groovy | 10 ---------- .../ajoberstar/grgit/operation/FetchOpSpec.groovy | 13 +------------ .../ajoberstar/grgit/operation/InitOpSpec.groovy | 8 ++------ .../ajoberstar/grgit/operation/LogOpSpec.groovy | 7 +------ .../ajoberstar/grgit/operation/MergeOpSpec.groovy | 7 ++----- .../ajoberstar/grgit/operation/PullOpSpec.groovy | 6 ------ .../ajoberstar/grgit/operation/PushOpSpec.groovy | 13 ------------- .../ajoberstar/grgit/operation/ResetOpSpec.groovy | 11 ----------- .../grgit/operation/RevertOpSpec.groovy | 13 ------------- .../ajoberstar/grgit/operation/RmOpSpec.groovy | 10 ---------- .../grgit/operation/StatusOpSpec.groovy | 10 ---------- .../grgit/operation/TagAddOpSpec.groovy | 13 ------------- .../grgit/operation/TagListOpSpec.groovy | 14 -------------- .../grgit/operation/TagRemoveOpSpec.groovy | 15 --------------- .../org/ajoberstar/grgit/util/JGitUtilSpec.groovy | 6 +++--- 50 files changed, 51 insertions(+), 306 deletions(-) diff --git a/src/main/groovy/org/ajoberstar/grgit/Repository.groovy b/src/main/groovy/org/ajoberstar/grgit/Repository.groovy index cc7d02d2..83a81582 100644 --- a/src/main/groovy/org/ajoberstar/grgit/Repository.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/Repository.groovy @@ -16,7 +16,9 @@ package org.ajoberstar.grgit import groovy.transform.Canonical + import org.ajoberstar.grgit.auth.Credentials + import org.eclipse.jgit.api.Git // TODO: When Gradle is built with Groovy 2.0+, switch to @Immutable diff --git a/src/main/groovy/org/ajoberstar/grgit/auth/JschAgentProxySessionFactory.groovy b/src/main/groovy/org/ajoberstar/grgit/auth/JschAgentProxySessionFactory.groovy index 8ffce819..b25b242c 100644 --- a/src/main/groovy/org/ajoberstar/grgit/auth/JschAgentProxySessionFactory.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/auth/JschAgentProxySessionFactory.groovy @@ -15,9 +15,6 @@ */ package org.ajoberstar.grgit.auth -import org.eclipse.jgit.transport.JschConfigSessionFactory -import org.eclipse.jgit.transport.OpenSshConfig.Host -import org.eclipse.jgit.util.FS import com.jcraft.jsch.IdentityRepository import com.jcraft.jsch.JSch import com.jcraft.jsch.JSchException @@ -29,6 +26,11 @@ import com.jcraft.jsch.agentproxy.USocketFactory import com.jcraft.jsch.agentproxy.connector.PageantConnector import com.jcraft.jsch.agentproxy.connector.SSHAgentConnector import com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory + +import org.eclipse.jgit.transport.JschConfigSessionFactory +import org.eclipse.jgit.transport.OpenSshConfig.Host +import org.eclipse.jgit.util.FS + import org.slf4j.Logger import org.slf4j.LoggerFactory diff --git a/src/main/groovy/org/ajoberstar/grgit/auth/TransportOpUtil.groovy b/src/main/groovy/org/ajoberstar/grgit/auth/TransportOpUtil.groovy index 8dadc2e5..2509267c 100644 --- a/src/main/groovy/org/ajoberstar/grgit/auth/TransportOpUtil.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/auth/TransportOpUtil.groovy @@ -19,6 +19,7 @@ import org.eclipse.jgit.api.TransportCommand import org.eclipse.jgit.awtui.AwtCredentialsProvider import org.eclipse.jgit.transport.CredentialsProvider import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider + import org.slf4j.Logger import org.slf4j.LoggerFactory diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/BranchListOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/BranchListOp.groovy index 42da4ab1..cbb7c881 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/BranchListOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/BranchListOp.groovy @@ -24,7 +24,6 @@ import org.ajoberstar.grgit.util.JGitUtil import org.eclipse.jgit.api.ListBranchCommand import org.eclipse.jgit.api.errors.GitAPIException -import org.eclipse.jgit.lib.Ref class BranchListOp implements Callable> { private final Repository repo diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/BranchRemoveOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/BranchRemoveOp.groovy index a4d96a86..aa4036b5 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/BranchRemoveOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/BranchRemoveOp.groovy @@ -17,13 +17,11 @@ package org.ajoberstar.grgit.operation import java.util.concurrent.Callable -import org.ajoberstar.grgit.Branch import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.exception.GrgitException import org.eclipse.jgit.api.DeleteBranchCommand import org.eclipse.jgit.api.errors.GitAPIException -import org.eclipse.jgit.lib.Ref class BranchRemoveOp implements Callable> { private final Repository repo diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/BranchStatusOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/BranchStatusOp.groovy index a0a46409..44440fa6 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/BranchStatusOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/BranchStatusOp.groovy @@ -19,8 +19,8 @@ import java.io.IOException import java.util.concurrent.Callable import org.ajoberstar.grgit.Branch -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.BranchStatus +import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.util.JGitUtil diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/CheckoutOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/CheckoutOp.groovy index c2c83b7a..b5abe4b9 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/CheckoutOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/CheckoutOp.groovy @@ -17,16 +17,11 @@ package org.ajoberstar.grgit.operation import java.util.concurrent.Callable -import org.ajoberstar.grgit.Commit -import org.ajoberstar.grgit.Person import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.exception.GrgitException -import org.ajoberstar.grgit.util.JGitUtil import org.eclipse.jgit.api.CheckoutCommand import org.eclipse.jgit.api.errors.GitAPIException -import org.eclipse.jgit.lib.PersonIdent -import org.eclipse.jgit.revwalk.RevCommit class CheckoutOp implements Callable { private final Repository repo diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/CloneOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/CloneOp.groovy index a41ad5ab..f294b134 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/CloneOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/CloneOp.groovy @@ -23,8 +23,8 @@ import org.ajoberstar.grgit.auth.TransportOpUtil import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.service.RepositoryService -import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.CloneCommand +import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.errors.GitAPIException class CloneOp implements Callable { diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/LogOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/LogOp.groovy index 83897436..881fd352 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/LogOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/LogOp.groovy @@ -21,6 +21,7 @@ import org.ajoberstar.grgit.Commit import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.util.JGitUtil + import org.eclipse.jgit.api.LogCommand import org.eclipse.jgit.api.errors.GitAPIException import org.eclipse.jgit.lib.ObjectId diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/PullOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/PullOp.groovy index 6df8f4c9..54e03444 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/PullOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/PullOp.groovy @@ -19,7 +19,6 @@ import java.util.concurrent.Callable import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.exception.GrgitException -import org.ajoberstar.grgit.util.JGitUtil import org.eclipse.jgit.api.PullCommand import org.eclipse.jgit.api.PullResult diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/RevertOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/RevertOp.groovy index 53da4eb9..08f7d1ed 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/RevertOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/RevertOp.groovy @@ -18,14 +18,12 @@ package org.ajoberstar.grgit.operation import java.util.concurrent.Callable import org.ajoberstar.grgit.Commit -import org.ajoberstar.grgit.Person import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.util.JGitUtil import org.eclipse.jgit.api.RevertCommand import org.eclipse.jgit.api.errors.GitAPIException -import org.eclipse.jgit.lib.PersonIdent import org.eclipse.jgit.revwalk.RevCommit class RevertOp implements Callable { diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/TagAddOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/TagAddOp.groovy index 92bbd3d2..af1508a2 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/TagAddOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/TagAddOp.groovy @@ -17,9 +17,9 @@ package org.ajoberstar.grgit.operation import java.util.concurrent.Callable -import org.ajoberstar.grgit.Tag import org.ajoberstar.grgit.Person import org.ajoberstar.grgit.Repository +import org.ajoberstar.grgit.Tag import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.util.JGitUtil diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/TagListOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/TagListOp.groovy index 7fa6f8ce..8448d124 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/TagListOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/TagListOp.groovy @@ -17,14 +17,13 @@ package org.ajoberstar.grgit.operation import java.util.concurrent.Callable -import org.ajoberstar.grgit.Tag import org.ajoberstar.grgit.Repository +import org.ajoberstar.grgit.Tag import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.util.JGitUtil import org.eclipse.jgit.api.ListTagCommand import org.eclipse.jgit.api.errors.GitAPIException -import org.eclipse.jgit.lib.Ref class TagListOp implements Callable> { private final Repository repo diff --git a/src/main/groovy/org/ajoberstar/grgit/operation/TagRemoveOp.groovy b/src/main/groovy/org/ajoberstar/grgit/operation/TagRemoveOp.groovy index 44355a97..ec0c7937 100644 --- a/src/main/groovy/org/ajoberstar/grgit/operation/TagRemoveOp.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/operation/TagRemoveOp.groovy @@ -17,13 +17,11 @@ package org.ajoberstar.grgit.operation import java.util.concurrent.Callable -import org.ajoberstar.grgit.Tag import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.exception.GrgitException import org.eclipse.jgit.api.DeleteTagCommand import org.eclipse.jgit.api.errors.GitAPIException -import org.eclipse.jgit.lib.Ref class TagRemoveOp implements Callable> { private final Repository repo diff --git a/src/main/groovy/org/ajoberstar/grgit/service/BranchService.groovy b/src/main/groovy/org/ajoberstar/grgit/service/BranchService.groovy index 89c65652..cfd0f987 100644 --- a/src/main/groovy/org/ajoberstar/grgit/service/BranchService.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/service/BranchService.groovy @@ -20,6 +20,7 @@ import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.operation.* import org.ajoberstar.grgit.util.JGitUtil import org.ajoberstar.grgit.util.OpSyntaxUtil + import org.eclipse.jgit.lib.Ref class BranchService { diff --git a/src/main/groovy/org/ajoberstar/grgit/service/RepositoryService.groovy b/src/main/groovy/org/ajoberstar/grgit/service/RepositoryService.groovy index 4b41c7e1..1af647d5 100644 --- a/src/main/groovy/org/ajoberstar/grgit/service/RepositoryService.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/service/RepositoryService.groovy @@ -17,7 +17,6 @@ package org.ajoberstar.grgit.service import org.ajoberstar.grgit.Commit import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.operation.* import org.ajoberstar.grgit.util.JGitUtil import org.ajoberstar.grgit.util.OpSyntaxUtil diff --git a/src/main/groovy/org/ajoberstar/grgit/service/TagService.groovy b/src/main/groovy/org/ajoberstar/grgit/service/TagService.groovy index 19a6e152..f5571e33 100644 --- a/src/main/groovy/org/ajoberstar/grgit/service/TagService.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/service/TagService.groovy @@ -15,7 +15,6 @@ */ package org.ajoberstar.grgit.service -import org.ajoberstar.grgit.Tag import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.operation.TagAddOp import org.ajoberstar.grgit.operation.TagListOp diff --git a/src/main/groovy/org/ajoberstar/grgit/util/JGitUtil.groovy b/src/main/groovy/org/ajoberstar/grgit/util/JGitUtil.groovy index 7ad7e338..9b32abb5 100644 --- a/src/main/groovy/org/ajoberstar/grgit/util/JGitUtil.groovy +++ b/src/main/groovy/org/ajoberstar/grgit/util/JGitUtil.groovy @@ -22,15 +22,15 @@ import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.Tag import org.ajoberstar.grgit.exception.GrgitException -import org.eclipse.jgit.api.errors.GitAPIException + import org.eclipse.jgit.errors.AmbiguousObjectException import org.eclipse.jgit.errors.IncorrectObjectTypeException import org.eclipse.jgit.errors.MissingObjectException import org.eclipse.jgit.errors.RevisionSyntaxException import org.eclipse.jgit.lib.BranchConfig import org.eclipse.jgit.lib.Config -import org.eclipse.jgit.lib.PersonIdent import org.eclipse.jgit.lib.ObjectId +import org.eclipse.jgit.lib.PersonIdent import org.eclipse.jgit.lib.Ref import org.eclipse.jgit.revwalk.RevCommit import org.eclipse.jgit.revwalk.RevObject diff --git a/src/test/groovy/org/ajoberstar/grgit/auth/AuthConfigSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/auth/AuthConfigSpec.groovy index 1c60815c..0c6dd20d 100644 --- a/src/test/groovy/org/ajoberstar/grgit/auth/AuthConfigSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/auth/AuthConfigSpec.groovy @@ -15,11 +15,11 @@ */ package org.ajoberstar.grgit.auth +import static org.ajoberstar.grgit.auth.AuthConfig.Option.* + import spock.lang.Specification import spock.lang.Unroll -import static org.ajoberstar.grgit.auth.AuthConfig.Option.* - class AuthConfigSpec extends Specification { @Unroll('with #properties only #allowed are allowed') def 'properties result in correct options allowed'() { diff --git a/src/test/groovy/org/ajoberstar/grgit/auth/LinuxAuthenticationSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/auth/LinuxAuthenticationSpec.groovy index 998a57e8..9092d249 100644 --- a/src/test/groovy/org/ajoberstar/grgit/auth/LinuxAuthenticationSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/auth/LinuxAuthenticationSpec.groovy @@ -15,19 +15,19 @@ */ package org.ajoberstar.grgit.auth -import spock.lang.Specification -import spock.lang.Unroll - import org.ajoberstar.grgit.Grgit import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.fixtures.LinuxSpecific import org.ajoberstar.grgit.fixtures.GitTestUtil +import org.ajoberstar.grgit.fixtures.LinuxSpecific +import org.ajoberstar.grgit.service.RepositoryService import org.junit.Rule import org.junit.experimental.categories.Category import org.junit.rules.TemporaryFolder +import spock.lang.Specification +import spock.lang.Unroll + @Category(LinuxSpecific) class LinuxAuthenticationSpec extends Specification { private static final String SSH_URI = 'git@github.com:ajoberstar/grgit-test.git' diff --git a/src/test/groovy/org/ajoberstar/grgit/auth/MacAuthenticationSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/auth/MacAuthenticationSpec.groovy index 4ec71017..2f725bc9 100644 --- a/src/test/groovy/org/ajoberstar/grgit/auth/MacAuthenticationSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/auth/MacAuthenticationSpec.groovy @@ -15,12 +15,12 @@ */ package org.ajoberstar.grgit.auth -import spock.lang.Specification - import org.ajoberstar.grgit.fixtures.MacSpecific import org.junit.experimental.categories.Category +import spock.lang.Specification + @Category(MacSpecific) class MacAuthenticationSpec extends Specification { def 'dummy'() { diff --git a/src/test/groovy/org/ajoberstar/grgit/auth/WindowsAuthenticationSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/auth/WindowsAuthenticationSpec.groovy index e4597b10..63a08164 100644 --- a/src/test/groovy/org/ajoberstar/grgit/auth/WindowsAuthenticationSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/auth/WindowsAuthenticationSpec.groovy @@ -15,19 +15,19 @@ */ package org.ajoberstar.grgit.auth -import spock.lang.Specification -import spock.lang.Unroll - import org.ajoberstar.grgit.Grgit import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.fixtures.WindowsSpecific import org.ajoberstar.grgit.fixtures.GitTestUtil +import org.ajoberstar.grgit.fixtures.WindowsSpecific +import org.ajoberstar.grgit.service.RepositoryService import org.junit.Rule import org.junit.experimental.categories.Category import org.junit.rules.TemporaryFolder +import spock.lang.Specification +import spock.lang.Unroll + @Category(WindowsSpecific) class WindowsAuthenticationSpec extends Specification { private static final String SSH_URI = 'git@github.com:ajoberstar/grgit-test.git' diff --git a/src/test/groovy/org/ajoberstar/grgit/fixtures/GitTestUtil.groovy b/src/test/groovy/org/ajoberstar/grgit/fixtures/GitTestUtil.groovy index 8cf00a94..5726adaa 100644 --- a/src/test/groovy/org/ajoberstar/grgit/fixtures/GitTestUtil.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/fixtures/GitTestUtil.groovy @@ -19,6 +19,7 @@ import org.ajoberstar.grgit.Branch import org.ajoberstar.grgit.Commit import org.ajoberstar.grgit.service.RepositoryService import org.ajoberstar.grgit.util.JGitUtil + import org.eclipse.jgit.api.ListBranchCommand.ListMode import org.eclipse.jgit.transport.RemoteConfig diff --git a/src/test/groovy/org/ajoberstar/grgit/fixtures/MultiGitOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/fixtures/MultiGitOpSpec.groovy index 4e2f073d..d19cd6e1 100644 --- a/src/test/groovy/org/ajoberstar/grgit/fixtures/MultiGitOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/fixtures/MultiGitOpSpec.groovy @@ -15,17 +15,17 @@ */ package org.ajoberstar.grgit.fixtures -import spock.lang.Specification - -import org.ajoberstar.grgit.service.RepositoryService import org.ajoberstar.grgit.Grgit import org.ajoberstar.grgit.Person +import org.ajoberstar.grgit.service.RepositoryService import org.eclipse.jgit.api.Git import org.junit.Rule import org.junit.rules.TemporaryFolder +import spock.lang.Specification + class MultiGitOpSpec extends Specification { @Rule TemporaryFolder tempDir = new TemporaryFolder() diff --git a/src/test/groovy/org/ajoberstar/grgit/fixtures/SimpleGitOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/fixtures/SimpleGitOpSpec.groovy index d1b6bfa1..961f3423 100644 --- a/src/test/groovy/org/ajoberstar/grgit/fixtures/SimpleGitOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/fixtures/SimpleGitOpSpec.groovy @@ -15,17 +15,17 @@ */ package org.ajoberstar.grgit.fixtures -import spock.lang.Specification - -import org.ajoberstar.grgit.service.RepositoryService import org.ajoberstar.grgit.Grgit import org.ajoberstar.grgit.Person +import org.ajoberstar.grgit.service.RepositoryService import org.eclipse.jgit.api.Git import org.junit.Rule import org.junit.rules.TemporaryFolder +import spock.lang.Specification + class SimpleGitOpSpec extends Specification { @Rule TemporaryFolder tempDir = new TemporaryFolder() diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/AddOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/AddOpSpec.groovy index 2b4ffc1d..3168cb18 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/AddOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/AddOpSpec.groovy @@ -15,15 +15,7 @@ */ package org.ajoberstar.grgit.operation -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class AddOpSpec extends SimpleGitOpSpec { def 'adding specific file only adds that file'() { diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/ApplyOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/ApplyOpSpec.groovy index d1d30f3c..f8a8a1b5 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/ApplyOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/ApplyOpSpec.groovy @@ -15,15 +15,7 @@ */ package org.ajoberstar.grgit.operation -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class ApplyOpSpec extends SimpleGitOpSpec { def 'apply with no patch fails'() { diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/BranchAddOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/BranchAddOpSpec.groovy index ea2eb4f9..adbdaf80 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/BranchAddOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/BranchAddOpSpec.groovy @@ -15,24 +15,12 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - -import org.ajoberstar.grgit.Branch -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode - -import org.junit.Rule -import org.junit.rules.TemporaryFolder +import spock.lang.Unroll class BranchAddOpSpec extends MultiGitOpSpec { RepositoryService localGrgit diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/BranchChangeOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/BranchChangeOpSpec.groovy index 9ab5b7d8..b642291c 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/BranchChangeOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/BranchChangeOpSpec.groovy @@ -15,24 +15,12 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - -import org.ajoberstar.grgit.Branch -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode - -import org.junit.Rule -import org.junit.rules.TemporaryFolder +import spock.lang.Unroll class BranchChangeOpSpec extends MultiGitOpSpec { RepositoryService localGrgit diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/BranchListOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/BranchListOpSpec.groovy index a9471dda..60e21132 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/BranchListOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/BranchListOpSpec.groovy @@ -15,24 +15,11 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - -import org.ajoberstar.grgit.Branch -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status -import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode - -import org.junit.Rule -import org.junit.rules.TemporaryFolder +import spock.lang.Unroll class BranchListOpSpec extends MultiGitOpSpec { RepositoryService localGrgit diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/BranchRemoveOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/BranchRemoveOpSpec.groovy index ac040fc6..5841f69e 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/BranchRemoveOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/BranchRemoveOpSpec.groovy @@ -15,24 +15,12 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - import org.ajoberstar.grgit.Branch -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode - -import org.junit.Rule -import org.junit.rules.TemporaryFolder +import spock.lang.Unroll class BranchRemoveOpSpec extends SimpleGitOpSpec { def setup() { diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/BranchStatusOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/BranchStatusOpSpec.groovy index b3ce9b4c..585ca14c 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/BranchStatusOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/BranchStatusOpSpec.groovy @@ -15,25 +15,13 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - -import org.ajoberstar.grgit.Branch import org.ajoberstar.grgit.BranchStatus -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode - -import org.junit.Rule -import org.junit.rules.TemporaryFolder +import spock.lang.Unroll class BranchStatusOpSpec extends MultiGitOpSpec { RepositoryService localGrgit diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/CheckoutOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/CheckoutOpSpec.groovy index 5881429a..e01a515d 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/CheckoutOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/CheckoutOpSpec.groovy @@ -15,22 +15,8 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil - -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class CheckoutOpSpec extends SimpleGitOpSpec { List commits = [] diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/CleanOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/CleanOpSpec.groovy index 56a25d49..10e95fee 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/CleanOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/CleanOpSpec.groovy @@ -15,15 +15,7 @@ */ package org.ajoberstar.grgit.operation -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class CleanOpSpec extends SimpleGitOpSpec { def setup() { diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/CloneOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/CloneOpSpec.groovy index 4ad81f43..d16ef2e4 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/CloneOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/CloneOpSpec.groovy @@ -15,22 +15,12 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Specification - import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode -import org.eclipse.jgit.transport.RemoteConfig - -import org.junit.Rule -import org.junit.rules.TemporaryFolder - class CloneOpSpec extends MultiGitOpSpec { File repoDir diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/CommitOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/CommitOpSpec.groovy index 72eaf1cb..9c043700 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/CommitOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/CommitOpSpec.groovy @@ -15,20 +15,10 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Specification - -import org.ajoberstar.grgit.Grgit import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class CommitOpSpec extends SimpleGitOpSpec { def setup() { diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/FetchOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/FetchOpSpec.groovy index ac6d9153..bb10d164 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/FetchOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/FetchOpSpec.groovy @@ -15,23 +15,12 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode - -import org.junit.Rule -import org.junit.rules.TemporaryFolder +import spock.lang.Unroll class FetchOpSpec extends MultiGitOpSpec { RepositoryService localGrgit diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/InitOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/InitOpSpec.groovy index 0f23aafc..01bb7f6c 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/InitOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/InitOpSpec.groovy @@ -15,18 +15,14 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Specification - import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.fixtures.GitTestUtil -import org.ajoberstar.grgit.service.RepositoryService - -import org.eclipse.jgit.api.Git import org.junit.Rule import org.junit.rules.TemporaryFolder +import spock.lang.Specification + class InitOpSpec extends Specification { @Rule TemporaryFolder tempDir = new TemporaryFolder() diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/LogOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/LogOpSpec.groovy index 080cc331..47d62287 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/LogOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/LogOpSpec.groovy @@ -16,15 +16,10 @@ package org.ajoberstar.grgit.operation import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService import org.ajoberstar.grgit.util.JGitUtil -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.lib.ObjectId + import org.eclipse.jgit.merge.MergeStrategy -import org.junit.Rule -import org.junit.rules.TemporaryFolder class LogOpSpec extends SimpleGitOpSpec { List commits = [] diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/MergeOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/MergeOpSpec.groovy index a4457e5e..78051ad2 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/MergeOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/MergeOpSpec.groovy @@ -15,17 +15,14 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll +import static org.ajoberstar.grgit.operation.MergeOp.Mode.* -import org.ajoberstar.grgit.Grgit import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException -import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil -import static org.ajoberstar.grgit.operation.MergeOp.Mode.* +import spock.lang.Unroll class MergeOpSpec extends MultiGitOpSpec { RepositoryService localGrgit diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/PullOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/PullOpSpec.groovy index f0f1bc17..627c3d02 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/PullOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/PullOpSpec.groovy @@ -15,16 +15,10 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - import org.ajoberstar.grgit.Commit -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException -import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil class PullOpSpec extends MultiGitOpSpec { RepositoryService localGrgit diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/PushOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/PushOpSpec.groovy index e7daf3f7..c54016db 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/PushOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/PushOpSpec.groovy @@ -15,24 +15,11 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - -import org.ajoberstar.grgit.Commit import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.GitTestUtil import org.ajoberstar.grgit.fixtures.MultiGitOpSpec import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil - -import org.eclipse.jgit.api.Git -import org.eclipse.jgit.api.ListBranchCommand.ListMode - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class PushOpSpec extends MultiGitOpSpec { RepositoryService localGrgit diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/ResetOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/ResetOpSpec.groovy index f8866bfa..53eecbbb 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/ResetOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/ResetOpSpec.groovy @@ -15,19 +15,8 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Specification - -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class ResetOpSpec extends SimpleGitOpSpec { List commits = [] diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/RevertOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/RevertOpSpec.groovy index 5249222b..a4a6f2c1 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/RevertOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/RevertOpSpec.groovy @@ -15,20 +15,7 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Specification - -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.exception.GrgitException -import org.ajoberstar.grgit.service.RepositoryService - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class RevertOpSpec extends SimpleGitOpSpec { List commits = [] diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/RmOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/RmOpSpec.groovy index 9c28c5c9..74394935 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/RmOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/RmOpSpec.groovy @@ -15,17 +15,7 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Specification - -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class RmOpSpec extends SimpleGitOpSpec { def setup() { diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/StatusOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/StatusOpSpec.groovy index b22ce75a..39190257 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/StatusOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/StatusOpSpec.groovy @@ -15,18 +15,8 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Specification - -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class StatusOpSpec extends SimpleGitOpSpec { def setup() { diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/TagAddOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/TagAddOpSpec.groovy index 25c6162c..06e460c2 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/TagAddOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/TagAddOpSpec.groovy @@ -15,22 +15,9 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - import org.ajoberstar.grgit.Tag -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class TagAddOpSpec extends SimpleGitOpSpec { List commits = [] diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/TagListOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/TagListOpSpec.groovy index eaf24e15..14918a72 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/TagListOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/TagListOpSpec.groovy @@ -15,22 +15,8 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - import org.ajoberstar.grgit.Tag -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status -import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class TagListOpSpec extends SimpleGitOpSpec { List commits = [] diff --git a/src/test/groovy/org/ajoberstar/grgit/operation/TagRemoveOpSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/operation/TagRemoveOpSpec.groovy index 8c469375..e5e7b89a 100644 --- a/src/test/groovy/org/ajoberstar/grgit/operation/TagRemoveOpSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/operation/TagRemoveOpSpec.groovy @@ -15,22 +15,7 @@ */ package org.ajoberstar.grgit.operation -import spock.lang.Unroll - -import org.ajoberstar.grgit.Tag -import org.ajoberstar.grgit.Grgit -import org.ajoberstar.grgit.Person -import org.ajoberstar.grgit.Repository -import org.ajoberstar.grgit.Status -import org.ajoberstar.grgit.exception.GrgitException import org.ajoberstar.grgit.fixtures.SimpleGitOpSpec -import org.ajoberstar.grgit.service.RepositoryService -import org.ajoberstar.grgit.util.JGitUtil - -import org.eclipse.jgit.api.Git - -import org.junit.Rule -import org.junit.rules.TemporaryFolder class TagRemoveOpSpec extends SimpleGitOpSpec { def setup() { diff --git a/src/test/groovy/org/ajoberstar/grgit/util/JGitUtilSpec.groovy b/src/test/groovy/org/ajoberstar/grgit/util/JGitUtilSpec.groovy index b0e00cc9..15416a3e 100644 --- a/src/test/groovy/org/ajoberstar/grgit/util/JGitUtilSpec.groovy +++ b/src/test/groovy/org/ajoberstar/grgit/util/JGitUtilSpec.groovy @@ -21,16 +21,16 @@ import org.ajoberstar.grgit.Person import org.ajoberstar.grgit.Repository import org.ajoberstar.grgit.Tag import org.ajoberstar.grgit.exception.GrgitException + import org.eclipse.jgit.api.Git -import org.eclipse.jgit.errors.AmbiguousObjectException -import org.eclipse.jgit.errors.IncorrectObjectTypeException import org.eclipse.jgit.errors.RevisionSyntaxException import org.eclipse.jgit.lib.ObjectId import org.eclipse.jgit.lib.Ref -import org.eclipse.jgit.revwalk.RevTag import org.eclipse.jgit.merge.MergeStrategy + import org.junit.Rule import org.junit.rules.TemporaryFolder + import spock.lang.Specification class JGitUtilSpec extends Specification {