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.String
branch
private boolean
cloneSubmodules
private boolean
isBare
private boolean
isMirror
private java.lang.String
localName
private boolean
noCheckout
private java.lang.Boolean
quiet
private java.lang.String
remoteName
private java.lang.String
sourceUri
(package private) int
timeout
-
Constructor Summary
Constructors Constructor Description Clone()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkingOut(AnyObjectId commit, java.lang.String path)
Notify checkout of commitvoid
cloningSubmodule(java.lang.String path)
Notify starting to clone a submodule.void
initializedSubmodules(java.util.Collection<java.lang.String> submodules)
Notify initialized submodules.protected boolean
requiresRepository()
If this command requires a repository.protected void
run()
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:
requiresRepository
in classTextBuiltin
- Returns:
- true if
TextBuiltin.db
/TextBuiltin.getRepository()
is required
-
run
protected void run() throws java.lang.Exception
Perform the actions of this command.This method should only be invoked by
TextBuiltin.execute(String[])
.- Specified by:
run
in 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:
initializedSubmodules
in interfaceCloneCommand.Callback
- Parameters:
submodules
- the submodules
-
cloningSubmodule
public void cloningSubmodule(java.lang.String path)
Notify starting to clone a submodule.- Specified by:
cloningSubmodule
in interfaceCloneCommand.Callback
- Parameters:
path
- the submodule path
-
checkingOut
public void checkingOut(AnyObjectId commit, java.lang.String path)
Notify checkout of commit- Specified by:
checkingOut
in interfaceCloneCommand.Callback
- Parameters:
commit
- the id of the commit being checked outpath
- the submodule path
-
-