Attr.addMacro Sync

var result = Attr.addMacro(repo, name, values);
Parameters Type  
repo Repository  
name String  
values String  
Returns  
Number  

Attr.cacheFlush Sync

Attr.cacheFlush(repo);
Parameters Type  
repo Repository  

Attr.get Async

Attr.get(repo, flags, path, name).then(function(string) {
  // Use string
});
Parameters Type  
repo Repository The repository containing the path.
flags Number A combination of GIT_ATTR_CHECK… flags.
path String The path to check for attributes. Relative paths are interpreted relative to the repo root. The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory).
name String The name of the attribute to look up.

| Returns | | | — | — | | String | Output of the value of the attribute. Use the GIT_ATTR_… macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just use the string value for attributes set to a value. You should NOT modify or free this value. |

Attr.getMany Async

Attr.getMany(repo, flags, path, num_attr, names).then(function(array) {
  // Use array
});
Parameters Type  
repo Repository The repository containing the path.
flags Number A combination of GIT_ATTR_CHECK… flags.
path String The path inside the repo to check attributes. This does not have to exist, but if it does not, then it will be treated as a plain file (i.e. not a directory).
num_attr Number The number of attributes being looked up
names String An array of num_attr strings containing attribute names.
Returns  
Array  

Attr.value Sync

var result = Attr.value(attr);
Parameters Type  
attr String The attribute
Returns  
Number the value type for the attribute

Attr.STATES ENUM

Flag Value
Attr.STATES.UNSPECIFIED_T 0
Attr.STATES.TRUE_T 1
Attr.STATES.FALSE_T 2
Attr.STATES.VALUE_T 3