public class AttributesHandler extends Object
getAttributes() yields the ready processed
attributes for the current path represented by the
TreeWalk
The implementation is based on the specifications in http://git-scm.com/docs/gitattributes
| Constructor and Description |
|---|
AttributesHandler(TreeWalk treeWalk)
Create an
AttributesHandler with
default rules as well as merged rules from global, info and worktree root
attributes |
| Modifier and Type | Method and Description |
|---|---|
protected void |
expandMacro(Attribute attr,
Attributes result)
Expand a macro
|
Attributes |
getAttributes()
|
protected void |
mergeAttributes(AttributesNode node,
String entryPath,
boolean isDirectory,
Attributes result)
Merges the matching node attributes for an entry path.
|
public AttributesHandler(TreeWalk treeWalk) throws IOException
AttributesHandler with
default rules as well as merged rules from global, info and worktree root
attributestreeWalk - a TreeWalkIOExceptionpublic Attributes getAttributes() throws IOException
Attributes for the
current path represented by the
TreeWalkIOExceptionprotected void mergeAttributes(@Nullable AttributesNode node, String entryPath, boolean isDirectory, Attributes result)
node - the node to scan for matches to entryPathentryPath - the path to test. The path must be relative to this attribute
node's own repository path, and in repository path format
(uses '/' and not '\').isDirectory - true if the target item is a directory.result - that will hold the attributes matching this entry path. This
method will NOT override any existing entry in attributes.protected void expandMacro(Attribute attr, Attributes result)
attr - a Attributeresult - contains the (recursive) expanded and merged macro attributes
including the attribute iselfCopyright © 2020 Eclipse JGit Project. All rights reserved.