Package org.eclipse.jgit.dircache
Class DirCacheEditor.DeletePath
java.lang.Object
org.eclipse.jgit.dircache.DirCacheEditor.PathEdit
org.eclipse.jgit.dircache.DirCacheEditor.DeletePath
- Enclosing class:
- DirCacheEditor
Deletes a single file entry from the index.
This deletion command removes only a single file at the given location,
but removes multiple stages (if present) for that path. To remove a
complete subtree use DirCacheEditor.DeleteTree
instead.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.jgit.dircache.DirCacheEditor.PathEdit
path, replace
-
Constructor Summary
ConstructorsConstructorDescriptionDeletePath
(String entryPath) Create a new deletion command by path name.DeletePath
(DirCacheEntry ent) Create a new deletion command for an existing entry instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(DirCacheEntry ent) Apply the update to a single cache entry matching the path.Methods inherited from class org.eclipse.jgit.dircache.DirCacheEditor.PathEdit
setReplace, toString
-
Constructor Details
-
DeletePath
Create a new deletion command by path name.- Parameters:
entryPath
- path of the file within the repository.
-
DeletePath
Create a new deletion command for an existing entry instance.- Parameters:
ent
- entry instance to remove. Only the path of this entry is actually considered during command evaluation.
-
-
Method Details
-
apply
Description copied from class:DirCacheEditor.PathEdit
Apply the update to a single cache entry matching the path.After apply is invoked the entry is added to the output table, and will be included in the new index.
- Specified by:
apply
in classDirCacheEditor.PathEdit
- Parameters:
ent
- the entry being processed. All fields are zeroed out if the path is a new path in the index.
-