Top Fields Constructors Methods
org.eclipse.jgit.pgm

pack-priv Class Clone

extends AbstractFetchCommand
implements Callback
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.api.CloneCommand.Callback
Annotations
@Command
common:true
usage:usage_cloneRepositoryIntoNewDir
Imports
java.io.File, .IOException, java.text.MessageFormat, java.time.Instant, java.util.ArrayList, .Collection, .List, org.eclipse.jgit.api.CloneCommand, .Git, org.eclipse.jgit.api.errors.InvalidRemoteException, .TransportException, org.eclipse.jgit.lib.AnyObjectId, .Constants, .TextProgressMonitor, org.eclipse.jgit.pgm.internal.CLIText, org.eclipse.jgit.transport.URIish, org.eclipse.jgit.util.SystemReader, org.kohsuke.args4j.Argument, .Option

Field Summary

Modifier and TypeField and Description
private String
private boolean
private Integer
private boolean
private boolean
private String
private boolean
private Boolean
private String
private List<String>
private Instant
private String
pack-priv int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
checkingOut(AnyObjectId
the id of the commit being checked out
commit
,
String
the submodule path
path
)

Implements org.eclipse.jgit.api.CloneCommand.Callback.checkingOut.

Notify checkout of commit

public void
cloningSubmodule(String
the submodule path
path
)

Implements org.eclipse.jgit.api.CloneCommand.Callback.cloningSubmodule.

Notify starting to clone a submodule.

public void
initializedSubmodules(Collection<String>
the submodules
submodules
)

Implements org.eclipse.jgit.api.CloneCommand.Callback.initializedSubmodules.

Notify initialized submodules.

protected final boolean
requiresRepository()

Overrides org.eclipse.jgit.pgm.TextBuiltin.requiresRepository.

If this command requires a repository.

protected void
run()

Implements abstract org.eclipse.jgit.pgm.TextBuiltin.run.

Perform the actions of this command.

Inherited from org.eclipse.jgit.pgm.AbstractFetchCommand:
showFetchResultshowRemoteMessages

Field Detail

branchback to summary
private String branch
Annotations
@Option
name:--branch
aliases:-b
metaVar:metaVar_branchName
usage:usage_checkoutBranchAfterClone
cloneSubmodulesback to summary
private boolean cloneSubmodules
Annotations
@Option
name:--recurse-submodules
usage:usage_recurseSubmodules
depthback to summary
private Integer depth
Annotations
@Option
name:--depth
metaVar:metaVar_depth
usage:usage_depth
isBareback to summary
private boolean isBare
Annotations
@Option
name:--bare
usage:usage_bareClone
isMirrorback to summary
private boolean isMirror
Annotations
@Option
name:--mirror
usage:usage_mirrorClone
localNameback to summary
private String localName
Annotations
@Argument
index:1
metaVar:metaVar_directory
noCheckoutback to summary
private boolean noCheckout
Annotations
@Option
name:--no-checkout
aliases:-n
usage:usage_noCheckoutAfterClone
quietback to summary
private Boolean quiet
Annotations
@Option
name:--quiet
usage:usage_quiet
remoteNameback to summary
private String remoteName
Annotations
@Option
name:--origin
aliases:-o
metaVar:metaVar_remoteName
usage:usage_useNameInsteadOfOriginToTrackUpstream
shallowExcludesback to summary
private List<String> shallowExcludes
Annotations
@Option
name:--shallow-exclude
metaVar:metaVar_shallowExclude
usage:usage_shallowExclude
shallowSinceback to summary
private Instant shallowSince
Annotations
@Option
name:--shallow-since
metaVar:metaVar_shallowSince
usage:usage_shallowSince
sourceUriback to summary
private String sourceUri
Annotations
@Argument
index:0
required:true
metaVar:metaVar_uriish
timeoutback to summary
pack-priv int timeout
Annotations
@Option
name:--timeout
metaVar:metaVar_seconds
usage:usage_abortConnectionIfNoActivity

Constructor Detail

Cloneback to summary
pack-priv Clone()

Method Detail

checkingOutback to summary
public void checkingOut(AnyObjectId commit, String path)

Implements org.eclipse.jgit.api.CloneCommand.Callback.checkingOut.

Doc from org.eclipse.jgit.api.CloneCommand.Callback.checkingOut.

Notify checkout of commit

Parameters
commit:AnyObjectId

the id of the commit being checked out

path:String

the submodule path

Annotations
@Override
cloningSubmoduleback to summary
public void cloningSubmodule(String path)

Implements org.eclipse.jgit.api.CloneCommand.Callback.cloningSubmodule.

Doc from org.eclipse.jgit.api.CloneCommand.Callback.cloningSubmodule.

Notify starting to clone a submodule.

Parameters
path:String

the submodule path

Annotations
@Override
initializedSubmodulesback to summary
public void initializedSubmodules(Collection<String> submodules)

Implements org.eclipse.jgit.api.CloneCommand.Callback.initializedSubmodules.

Doc from org.eclipse.jgit.api.CloneCommand.Callback.initializedSubmodules.

Notify initialized submodules.

Parameters
submodules:Collection<String>

the submodules

Annotations
@Override
requiresRepositoryback to summary
protected final boolean requiresRepository()

Overrides org.eclipse.jgit.pgm.TextBuiltin.requiresRepository.

Doc from org.eclipse.jgit.pgm.TextBuiltin.requiresRepository.

If this command requires a repository.

Returns:boolean

true if db/getRepository() is required

Annotations
@Override
runback to summary
protected void run() throws Exception

Implements abstract org.eclipse.jgit.pgm.TextBuiltin.run.

Doc from org.eclipse.jgit.pgm.TextBuiltin.run.

Perform the actions of this command.

This method should only be invoked by execute(String[]).

Annotations
@Override
Exceptions
Exception:
an error occurred while processing the command. The main framework will catch the exception and print a message on standard error.