Package org.eclipse.jgit.pgm
Class Clone
- java.lang.Object
-
- org.eclipse.jgit.pgm.TextBuiltin
-
- org.eclipse.jgit.pgm.AbstractFetchCommand
-
- org.eclipse.jgit.pgm.Clone
-
- All Implemented Interfaces:
CloneCommand.Callback
class Clone extends AbstractFetchCommand implements CloneCommand.Callback
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.pgm.TextBuiltin
TextBuiltin.TerminatedByHelpException
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringbranchprivate booleancloneSubmodulesprivate booleanisBareprivate booleanisMirrorprivate java.lang.StringlocalNameprivate booleannoCheckoutprivate java.lang.Booleanquietprivate java.lang.StringremoteNameprivate java.lang.StringsourceUri(package private) inttimeout
-
Constructor Summary
Constructors Constructor Description Clone()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckingOut(AnyObjectId commit, java.lang.String path)Notify checkout of commitvoidcloningSubmodule(java.lang.String path)Notify starting to clone a submodule.voidinitializedSubmodules(java.util.Collection<java.lang.String> submodules)Notify initialized submodules.protected booleanrequiresRepository()If this command requires a repository.protected voidrun()Perform the actions of this command.-
Methods inherited from class org.eclipse.jgit.pgm.AbstractFetchCommand
showFetchResult, showRemoteMessages
-
Methods inherited from class org.eclipse.jgit.pgm.TextBuiltin
abbreviateRef, containsHelp, die, die, die, die, execute, getErrorWriter, getOutputWriter, getRepository, getResourceBundle, init, initRaw, parseArguments, printUsage, printUsageAndExit, printUsageAndExit, resolve, setCommandName
-
-
-
-
Field Detail
-
remoteName
private java.lang.String remoteName
-
branch
private java.lang.String branch
-
noCheckout
private boolean noCheckout
-
isBare
private boolean isBare
-
isMirror
private boolean isMirror
-
quiet
private java.lang.Boolean quiet
-
cloneSubmodules
private boolean cloneSubmodules
-
timeout
int timeout
-
sourceUri
private java.lang.String sourceUri
-
localName
private java.lang.String localName
-
-
Method Detail
-
requiresRepository
protected final boolean requiresRepository()
If this command requires a repository.- Overrides:
requiresRepositoryin classTextBuiltin- Returns:
- true if
TextBuiltin.db/TextBuiltin.getRepository()is required
-
run
protected void run() throws java.lang.ExceptionPerform the actions of this command.This method should only be invoked by
TextBuiltin.execute(String[]).- Specified by:
runin classTextBuiltin- Throws:
java.lang.Exception- an error occurred while processing the command. The main framework will catch the exception and print a message on standard error.
-
initializedSubmodules
public void initializedSubmodules(java.util.Collection<java.lang.String> submodules)
Notify initialized submodules.- Specified by:
initializedSubmodulesin interfaceCloneCommand.Callback- Parameters:
submodules- the submodules
-
cloningSubmodule
public void cloningSubmodule(java.lang.String path)
Notify starting to clone a submodule.- Specified by:
cloningSubmodulein interfaceCloneCommand.Callback- Parameters:
path- the submodule path
-
checkingOut
public void checkingOut(AnyObjectId commit, java.lang.String path)
Notify checkout of commit- Specified by:
checkingOutin interfaceCloneCommand.Callback- Parameters:
commit- the id of the commit being checked outpath- the submodule path
-
-