Top Description Fields Constructors Methods
org.eclipse.jgit.ant.tasks

public Class GitInitTask

extends Task
Class Inheritance
Imports
java.io.File, org.apache.tools.ant.BuildException, .Task, org.eclipse.jgit.api.Git, .InitCommand

Create an empty git repository.
See Also
git-init(1)

Field Summary

Modifier and TypeField and Description
private boolean
private File
Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Called by the project to let the task do its work.

public void
setBare(boolean
whether the repository should be initialized to a bare repository or not.
bare
)

Configure if the repository should be bare

public void
setDest(File
the destination directory that should be initialized with the git repository.
dest
)

Set the destination git repository.

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

bareback to summary
private boolean bare
destinationback to summary
private File destination

Constructor Detail

GitInitTaskback to summary
public GitInitTask()

Method Detail

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

Doc from org.apache.tools.ant.Task.execute.

Called by the project to let the task do its work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.

Annotations
@Override
Exceptions
BuildException:
if something goes wrong with the build.
setBareback to summary
public void setBare(boolean bare)

Configure if the repository should be bare

Parameters
bare:boolean

whether the repository should be initialized to a bare repository or not.

setDestback to summary
public void setDest(File dest)

Set the destination git repository.

Parameters
dest:File

the destination directory that should be initialized with the git repository.