Package org.eclipse.jgit.dircache
Class DirCacheEditor.DeleteTree
java.lang.Object
org.eclipse.jgit.dircache.DirCacheEditor.PathEdit
org.eclipse.jgit.dircache.DirCacheEditor.DeleteTree
- Enclosing class:
DirCacheEditor
Recursively deletes all paths under a subtree.
This deletion command is more generic than DirCacheEditor.DeletePath
as it can
remove all records which appear recursively under the same subtree.
Multiple stages are removed (if present) for any deleted entry.
This command will not remove a single file entry. To remove a single file
use DirCacheEditor.DeletePath
.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.jgit.dircache.DirCacheEditor.PathEdit
path, replace
-
Constructor Summary
ConstructorsConstructorDescriptionDeleteTree
(byte[] path) DeleteTree
(String entryPath) Create a new tree deletion command by path name. -
Method Summary
Modifier and TypeMethodDescriptionprivate static byte[]
appendSlash
(byte[] path) void
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
-
DeleteTree
Create a new tree deletion command by path name.- Parameters:
entryPath
- path of the subtree within the repository. If the path does not end with "/" a "/" is implicitly added to ensure only the subtree's contents are matched by the command. The special case "" (not "/"!) deletes all entries.
-
DeleteTree
DeleteTree(byte[] path)
-
-
Method Details
-
appendSlash
private static byte[] appendSlash(byte[] path) -
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.
-