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

public Class GitAddTask

extends Task
Class Inheritance
Imports
java.io.File, .IOException, org.apache.tools.ant.BuildException, .Project, .Task, org.apache.tools.ant.types.DirSet, .FileSet, org.apache.tools.ant.types.resources.Union, org.eclipse.jgit.api.AddCommand, .Git, org.eclipse.jgit.api.errors.GitAPIException, org.eclipse.jgit.lib.Repository, .RepositoryCache, org.eclipse.jgit.storage.file.FileRepositoryBuilder, org.eclipse.jgit.util.FS

Adds a file to the git index.
See Also
git-add(1)

Field Summary

Modifier and TypeField and Description
private Union
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
addDirset(DirSet
a set of files to add.
set
)

Add a set of files to add.

public void
addFileset(FileSet
a set of files to add.
set
)

Add a set of files to add.

public void
execute()

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

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

private synchronized Union
public void
setSrc(File
the src to set
src
)

Set the field src.

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

Field Detail

pathback to summary
private Union path
srcback to summary
private File src

Constructor Detail

GitAddTaskback to summary
public GitAddTask()

Method Detail

addDirsetback to summary
public void addDirset(DirSet set)

Add a set of files to add.

Parameters
set:DirSet

a set of files to add.

addFilesetback to summary
public void addFileset(FileSet set)

Add a set of files to add.

Parameters
set:FileSet

a set of files to add.

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.
getPathback to summary
private synchronized Union getPath()
setSrcback to summary
public void setSrc(File src)

Set the field src.

Parameters
src:File

the src to set

translateFilePathUsingPrefixback to summary
private String translateFilePathUsingPrefix(String file, String prefix) throws IOException