public static final class DirCacheEditor.DeleteTree extends DirCacheEditor.PathEdit
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
.
DirCacheEditor.DeletePath
Constructor and Description |
---|
DeleteTree(String entryPath)
Create a new tree deletion command by path name.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(DirCacheEntry ent)
Apply the update to a single cache entry matching the path.
|
setReplace, toString
public DeleteTree(String entryPath)
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.public void apply(DirCacheEntry ent)
DirCacheEditor.PathEdit
After apply is invoked the entry is added to the output table, and will be included in the new index.
apply
in class DirCacheEditor.PathEdit
ent
- the entry being processed. All fields are zeroed out if
the path is a new path in the index.Copyright © 2020 Eclipse JGit Project. All rights reserved.