Class GitCheckOutCommand
java.lang.Object
org.apache.maven.scm.command.AbstractCommand
org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
org.apache.maven.scm.provider.git.gitexe.command.checkout.GitCheckOutCommand
- All Implemented Interfaces:
Command
,GitCommand
- Author:
- Mark Struberg
-
Field Summary
Fields inherited from class org.apache.maven.scm.command.AbstractCommand
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.codehaus.plexus.util.cli.Commandline
createCommandLine
(GitScmProviderRepository repository, File workingDirectory, ScmVersion version) protected CheckOutScmResult
executeCheckOutCommand
(ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version, boolean recursive, boolean shallow) The overridenexecuteCommand(ScmProviderRepository, ScmFileSet, CommandParameters)
in this class will not call this method!executeCommand
(ScmProviderRepository repo, ScmFileSet fileSet, CommandParameters parameters) For git, the given repository is a remote one.Methods inherited from class org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
executeCheckOutCommand
Methods inherited from class org.apache.maven.scm.command.AbstractCommand
execute
-
Constructor Details
-
GitCheckOutCommand
-
-
Method Details
-
executeCommand
public ScmResult executeCommand(ScmProviderRepository repo, ScmFileSet fileSet, CommandParameters parameters) throws ScmException For git, the given repository is a remote one. We have to clone it first if the working directory does not contain a git repo yet, otherwise we have to git-pull it.TODO We currently assume a '.git' directory, so this does not work for --bare repos
- Overrides:
executeCommand
in classAbstractCheckOutCommand
- Throws:
ScmException
-
createCommandLine
public static org.codehaus.plexus.util.cli.Commandline createCommandLine(GitScmProviderRepository repository, File workingDirectory, ScmVersion version) -
executeCheckOutCommand
protected CheckOutScmResult executeCheckOutCommand(ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version, boolean recursive, boolean shallow) throws ScmException The overridenexecuteCommand(ScmProviderRepository, ScmFileSet, CommandParameters)
in this class will not call this method!Execute Check out command line.
- Specified by:
executeCheckOutCommand
in classAbstractCheckOutCommand
- Parameters:
repo
- not nullfileSet
- not nullversion
- not nullrecursive
-true
if recursive check out is wanted,false
otherwise.shallow
-true
if shallow check out is wanted,false
otherwise.- Returns:
- the checkout result
- Throws:
ScmException
- if any
-