org.apache.maven.scm.provider.git.gitexe.command.checkout
Class GitCheckOutCommand

java.lang.Object
  extended by org.apache.maven.scm.command.AbstractCommand
      extended by org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
          extended by org.apache.maven.scm.provider.git.gitexe.command.checkout.GitCheckOutCommand
All Implemented Interfaces:
Command, GitCommand

public class GitCheckOutCommand
extends AbstractCheckOutCommand
implements GitCommand

Version:
$Id: GitCheckOutCommand.java 690997 2008-09-01 15:29:28Z vsiveton $
Author:
Mark Struberg

Field Summary
 
Fields inherited from interface org.apache.maven.scm.command.Command
ROLE
 
Constructor Summary
GitCheckOutCommand()
           
 
Method Summary
static org.codehaus.plexus.util.cli.Commandline createCommandLine(GitScmProviderRepository repository, java.io.File workingDirectory, ScmVersion version)
           
protected  CheckOutScmResult executeCheckOutCommand(ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version, boolean recursive)
          For git, the given repository is a remote one.
 
Methods inherited from class org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
executeCheckOutCommand, executeCommand
 
Methods inherited from class org.apache.maven.scm.command.AbstractCommand
execute, getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.scm.command.Command
execute, getLogger, setLogger
 

Constructor Detail

GitCheckOutCommand

public GitCheckOutCommand()
Method Detail

executeCheckOutCommand

protected CheckOutScmResult executeCheckOutCommand(ScmProviderRepository repo,
                                                   ScmFileSet fileSet,
                                                   ScmVersion version,
                                                   boolean recursive)
                                            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

Specified by:
executeCheckOutCommand in class AbstractCheckOutCommand
Throws:
ScmException

createCommandLine

public static org.codehaus.plexus.util.cli.Commandline createCommandLine(GitScmProviderRepository repository,
                                                                         java.io.File workingDirectory,
                                                                         ScmVersion version)


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.