UNPKG

sourcecontrol

Version:

A modern TypeScript CLI application for source control

65 lines 2.62 kB
export declare class IndexEntryLayout { static readonly CTIME_SECONDS_OFFSET = 0; static readonly CTIME_NANOSECONDS_OFFSET = 4; static readonly MTIME_SECONDS_OFFSET = 8; static readonly MTIME_NANOSECONDS_OFFSET = 12; static readonly DEVICE_ID_OFFSET = 16; static readonly INODE_OFFSET = 20; static readonly MODE_OFFSET = 24; static readonly USER_ID_OFFSET = 28; static readonly GROUP_ID_OFFSET = 32; static readonly FILE_SIZE_OFFSET = 36; static readonly SHA_OFFSET = 40; static readonly FLAGS_OFFSET = 60; static readonly FIXED_HEADER_SIZE = 62; static readonly SHA_BYTE_LENGTH = 20; static readonly FLAGS_BYTE_LENGTH = 2; static readonly FIELD_SIZE_BYTES = 4; static readonly ALIGNMENT_BOUNDARY = 8; static readonly MAX_FILENAME_LENGTH = 4095; } export declare class GitFileMode { static readonly TYPE_MASK = 15; static readonly TYPE_SHIFT = 12; static readonly REGULAR_FILE_TYPE = 8; static readonly SYMBOLIC_LINK_TYPE = 10; static readonly GITLINK_TYPE = 14; static readonly DIRECTORY_TYPE = 0; static readonly PERMISSION_MASK = 511; static readonly EXECUTABLE_MASK = 73; static readonly DEFAULT_FILE_MODE = 33188; static readonly EXECUTABLE_FILE_MODE = 33261; static getFileType(mode: number): number; static getPermissions(mode: number): number; static isRegularFile(mode: number): boolean; static isSymbolicLink(mode: number): boolean; static isGitlink(mode: number): boolean; static isDirectory(mode: number): boolean; static isExecutable(mode: number): boolean; } export declare class IndexEntryFlags { static readonly ASSUME_VALID_BIT = 15; static readonly ASSUME_VALID_MASK = 32768; static readonly EXTENDED_BIT = 14; static readonly EXTENDED_MASK = 16384; static readonly STAGE_SHIFT = 12; static readonly STAGE_MASK = 12288; static readonly FILENAME_LENGTH_MASK = 4095; static readonly MAX_FILENAME_LENGTH = 4095; static encode(assumeValid: boolean, stage: number, filenameLength: number): number; static decode(flags: number): { assumeValid: boolean; stage: number; filenameLength: number; }; } export declare class GitTimestamp { readonly seconds: number; readonly nanoseconds: number; constructor(seconds: number, nanoseconds: number); static fromMilliseconds(milliseconds: number): GitTimestamp; toDate(): Date; toArray(): [number, number]; static fromArray([seconds, nanoseconds]: [number, number]): GitTimestamp; } //# sourceMappingURL=index-entry-utils.d.ts.map