1 | import { Repository } from "./repository";
|
2 |
|
3 | export namespace Attr {
|
4 | const enum STATES {
|
5 | UNSPECIFIED_T = 0,
|
6 | TRUE_T = 1,
|
7 | FALSE_T = 2,
|
8 | VALUE_T = 3,
|
9 | }
|
10 | }
|
11 |
|
12 | export class Attr {
|
13 | static addMacro(repo: Repository, name: string, values: string): number;
|
14 | static cacheFlush(repo: Repository): void;
|
15 | /**
|
16 | * @param repo - The repository containing the path.
|
17 | * @param flags - A combination of GIT_ATTR_CHECK... flags.
|
18 | * @param path - The path to check for attributes. Relative paths are interpreted relative to the repo root.
|
19 | * The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory).
|
20 | * @param name - The name of the attribute to look up.
|
21 | * @returns - Output of the value of the attribute. Use the GIT_ATTR_...
|
22 | */
|
23 | static get(repo: Repository, flags: number, path: string, name: string): Promise<string>;
|
24 | /**
|
25 | * @param repo - The repository containing the path.
|
26 | * @param flags - A combination of GIT_ATTR_CHECK... flags.
|
27 | * @param path - The path to check for attributes. Relative paths are interpreted relative to the repo root.
|
28 | * The file does not have to exist, but if it does not, then it will be treated as a plain file (not a directory).
|
29 | * @param numAttr - The number of attributes being looked up
|
30 | * @param names - An array of num_attr strings containing attribute names.
|
31 | */
|
32 | static getMany(repo: Repository, flags: number, path: string, numAttr: number, names: string): any[];
|
33 | /**
|
34 | * @param attr - The attribute
|
35 | * @returns - the value type for the attribute
|
36 | */
|
37 | static value(attr: string): number;
|
38 | }
|