@catmint-fs/git 0.0.0-prealpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,615 @@
1
+ import { DirentEntry, StatResult } from '@catmint-fs/core';
2
+
3
+ interface Layer {
4
+ readFile(path: string): Promise<Uint8Array>;
5
+ writeFile(path: string, content: string | Uint8Array, options?: {
6
+ mode?: number;
7
+ uid?: number;
8
+ gid?: number;
9
+ }): Promise<void>;
10
+ readdir(path: string): Promise<DirentEntry[]>;
11
+ stat(path: string): Promise<StatResult>;
12
+ lstat(path: string): Promise<StatResult>;
13
+ readlink(path: string): Promise<string>;
14
+ exists(path: string): Promise<boolean>;
15
+ mkdir(path: string, options?: {
16
+ recursive?: boolean;
17
+ mode?: number;
18
+ }): Promise<void>;
19
+ rm(path: string, options?: {
20
+ recursive?: boolean;
21
+ force?: boolean;
22
+ }): Promise<void>;
23
+ rmdir(path: string): Promise<void>;
24
+ rename(from: string, to: string): Promise<void>;
25
+ symlink(target: string, path: string): Promise<void>;
26
+ chmod(path: string, mode: number): Promise<void>;
27
+ createReadStream(path: string): ReadableStream<Uint8Array>;
28
+ }
29
+ interface GitIdentity {
30
+ name: string;
31
+ email: string;
32
+ timestamp?: number;
33
+ timezoneOffset?: number;
34
+ }
35
+ interface GitIdentityFull {
36
+ name: string;
37
+ email: string;
38
+ timestamp: number;
39
+ timezoneOffset: number;
40
+ }
41
+ interface BranchInfo {
42
+ name: string;
43
+ current: boolean;
44
+ commit: string;
45
+ upstream: string | null;
46
+ }
47
+ interface RemoteInfo {
48
+ name: string;
49
+ url: string;
50
+ }
51
+ interface RefEntry {
52
+ name: string;
53
+ oid: string;
54
+ }
55
+ type StatusCode = "added" | "modified" | "deleted" | "renamed" | "untracked" | "ignored" | "unmodified";
56
+ interface StatusEntry {
57
+ path: string;
58
+ index: StatusCode;
59
+ workingTree: StatusCode;
60
+ /** For renames: original path */
61
+ origPath?: string;
62
+ }
63
+ interface CommitInfo {
64
+ oid: string;
65
+ tree: string;
66
+ parents: string[];
67
+ author: GitIdentityFull;
68
+ committer: GitIdentityFull;
69
+ message: string;
70
+ }
71
+ interface TagInfo {
72
+ name: string;
73
+ oid: string;
74
+ /** Tag type. */
75
+ type: "lightweight" | "annotated";
76
+ /** If annotated, the commit it points to */
77
+ target?: string;
78
+ tagger?: GitIdentityFull;
79
+ message?: string;
80
+ }
81
+ interface StashEntry {
82
+ index: number;
83
+ oid: string;
84
+ message: string;
85
+ }
86
+ interface FetchResult {
87
+ /** Refs that were updated. */
88
+ updated: Array<{
89
+ ref: string;
90
+ oldOid: string | null;
91
+ newOid: string;
92
+ }>;
93
+ }
94
+ interface PushResult {
95
+ ok: boolean;
96
+ refs: Array<{
97
+ ref: string;
98
+ status: "ok" | "rejected";
99
+ reason?: string;
100
+ }>;
101
+ }
102
+ interface MergeResult {
103
+ /** How the merge was resolved. */
104
+ type: "fast-forward" | "merge-commit" | "already-up-to-date";
105
+ /** The resulting commit OID (absent for "already-up-to-date"). */
106
+ oid?: string;
107
+ /** Conflicted file paths (non-empty only if merge has conflicts). */
108
+ conflicts: string[];
109
+ }
110
+ interface DiffLine {
111
+ /** Line origin: "+" (added), "-" (removed), " " (context). */
112
+ origin: "+" | "-" | " ";
113
+ /** Line content (without the origin marker). */
114
+ content: string;
115
+ /** Line number in the old file (undefined for added lines). */
116
+ oldLineNumber?: number;
117
+ /** Line number in the new file (undefined for deleted lines). */
118
+ newLineNumber?: number;
119
+ }
120
+ interface DiffHunk {
121
+ oldStart: number;
122
+ oldLines: number;
123
+ newStart: number;
124
+ newLines: number;
125
+ header: string;
126
+ lines: DiffLine[];
127
+ }
128
+ interface DiffFile {
129
+ /** Path of the file. */
130
+ path: string;
131
+ /** Previous path (if renamed). */
132
+ oldPath?: string;
133
+ status: "added" | "modified" | "deleted" | "renamed";
134
+ binary: boolean;
135
+ hunks: DiffHunk[];
136
+ similarity?: number;
137
+ }
138
+ interface DiffResult {
139
+ files: DiffFile[];
140
+ }
141
+ interface InitOptions {
142
+ defaultBranch?: string;
143
+ bare?: boolean;
144
+ }
145
+ interface CloneOptions {
146
+ url: string;
147
+ depth?: number;
148
+ branch?: string;
149
+ bare?: boolean;
150
+ transport?: GitTransport;
151
+ auth?: {
152
+ username: string;
153
+ password: string;
154
+ };
155
+ }
156
+ interface CommitOptions {
157
+ message: string;
158
+ author?: GitIdentity;
159
+ committer?: GitIdentity;
160
+ amend?: boolean;
161
+ allowEmpty?: boolean;
162
+ }
163
+ interface LogOptions {
164
+ ref?: string;
165
+ maxCount?: number;
166
+ skip?: number;
167
+ since?: Date;
168
+ until?: Date;
169
+ path?: string;
170
+ }
171
+ interface CheckoutOptions {
172
+ force?: boolean;
173
+ create?: boolean;
174
+ }
175
+ interface CreateBranchOptions {
176
+ startPoint?: string;
177
+ force?: boolean;
178
+ }
179
+ interface DeleteBranchOptions {
180
+ force?: boolean;
181
+ }
182
+ interface ListBranchesOptions {
183
+ remote?: boolean;
184
+ }
185
+ interface MergeOptions {
186
+ message?: string;
187
+ author?: GitIdentity;
188
+ noFastForward?: boolean;
189
+ fastForwardOnly?: boolean;
190
+ }
191
+ interface FetchOptions {
192
+ branch?: string;
193
+ depth?: number;
194
+ tags?: boolean;
195
+ transport?: GitTransport;
196
+ prune?: boolean;
197
+ auth?: {
198
+ username: string;
199
+ password: string;
200
+ };
201
+ }
202
+ interface PullOptions {
203
+ remote?: string;
204
+ branch?: string;
205
+ rebase?: boolean;
206
+ fastForwardOnly?: boolean;
207
+ author?: GitIdentity;
208
+ depth?: number;
209
+ tags?: boolean;
210
+ transport?: GitTransport;
211
+ auth?: {
212
+ username: string;
213
+ password: string;
214
+ };
215
+ }
216
+ interface PushOptions {
217
+ remote?: string;
218
+ branch?: string;
219
+ force?: boolean;
220
+ setUpstream?: boolean;
221
+ tags?: boolean;
222
+ transport?: GitTransport;
223
+ auth?: {
224
+ username: string;
225
+ password: string;
226
+ };
227
+ }
228
+ interface CreateTagOptions {
229
+ target?: string;
230
+ message?: string;
231
+ tagger?: GitIdentity;
232
+ }
233
+ interface DiffOptions {
234
+ /** Compare index vs HEAD (staged changes). Default: working tree vs index */
235
+ staged?: boolean;
236
+ /** Specific path to diff */
237
+ path?: string;
238
+ /** Compare two refs: source ref or OID */
239
+ from?: string;
240
+ /** Compare two refs: target ref or OID */
241
+ to?: string;
242
+ /** Number of context lines around each change. Default: 3 */
243
+ contextLines?: number;
244
+ }
245
+ interface StashOptions {
246
+ message?: string;
247
+ includeUntracked?: boolean;
248
+ }
249
+ interface ApplyStashOptions {
250
+ index?: number;
251
+ }
252
+ interface ResetOptions {
253
+ mode?: "soft" | "mixed" | "hard";
254
+ paths?: string[];
255
+ }
256
+ interface RemoveOptions {
257
+ cached?: boolean;
258
+ recursive?: boolean;
259
+ }
260
+ interface TransportDiscoveryResult {
261
+ refs: RefEntry[];
262
+ capabilities: string[];
263
+ }
264
+ interface TransportFetchRequest {
265
+ wants: string[];
266
+ haves: string[];
267
+ depth?: number;
268
+ }
269
+ interface TransportFetchResponse {
270
+ packfile: Uint8Array;
271
+ acks: string[];
272
+ }
273
+ interface TransportPushRequest {
274
+ updates: Array<{
275
+ ref: string;
276
+ oldOid: string;
277
+ newOid: string;
278
+ }>;
279
+ packfile: Uint8Array;
280
+ }
281
+ interface TransportPushResponse {
282
+ ok: boolean;
283
+ refs: Array<{
284
+ ref: string;
285
+ status: "ok" | "rejected";
286
+ reason?: string;
287
+ }>;
288
+ }
289
+ interface GitTransport {
290
+ discover(url: string, service: "git-upload-pack" | "git-receive-pack"): Promise<TransportDiscoveryResult>;
291
+ fetch(url: string, request: TransportFetchRequest): Promise<TransportFetchResponse>;
292
+ push(url: string, request: TransportPushRequest): Promise<TransportPushResponse>;
293
+ }
294
+ type GitObjectType = "blob" | "tree" | "commit" | "tag";
295
+ interface GitObject {
296
+ type: GitObjectType;
297
+ content: Uint8Array;
298
+ }
299
+ interface TreeEntry {
300
+ mode: string;
301
+ name: string;
302
+ oid: string;
303
+ }
304
+ interface IndexEntry {
305
+ ctimeSeconds: number;
306
+ ctimeNanoseconds: number;
307
+ mtimeSeconds: number;
308
+ mtimeNanoseconds: number;
309
+ dev: number;
310
+ ino: number;
311
+ mode: number;
312
+ uid: number;
313
+ gid: number;
314
+ size: number;
315
+ oid: string;
316
+ flags: number;
317
+ path: string;
318
+ stage: number;
319
+ }
320
+
321
+ declare class ObjectDB {
322
+ private layer;
323
+ private gitDir;
324
+ constructor(layer: Layer, gitDir: string);
325
+ writeObject(type: GitObjectType, content: Uint8Array): Promise<string>;
326
+ readObject(oid: string): Promise<GitObject>;
327
+ existsObject(oid: string): Promise<boolean>;
328
+ private parseRawObject;
329
+ private readFromPacks;
330
+ writeBlob(content: Uint8Array): Promise<string>;
331
+ writeTree(entries: TreeEntry[]): Promise<string>;
332
+ parseTree(content: Uint8Array): TreeEntry[];
333
+ writeCommit(tree: string, parents: string[], author: GitIdentityFull, committer: GitIdentityFull, message: string): Promise<string>;
334
+ parseCommit(content: Uint8Array): {
335
+ tree: string;
336
+ parents: string[];
337
+ author: GitIdentityFull;
338
+ committer: GitIdentityFull;
339
+ message: string;
340
+ };
341
+ writeTag(object: string, type: GitObjectType, tagName: string, tagger: GitIdentityFull, message: string): Promise<string>;
342
+ parseTag(content: Uint8Array): {
343
+ object: string;
344
+ type: GitObjectType;
345
+ tag: string;
346
+ tagger: GitIdentityFull;
347
+ message: string;
348
+ };
349
+ hashObject(type: GitObjectType, content: Uint8Array): Promise<string>;
350
+ }
351
+ declare function formatIdentity(id: GitIdentityFull): string;
352
+ declare function parseIdentity(str: string): GitIdentityFull;
353
+
354
+ declare class RefStore {
355
+ private layer;
356
+ private gitDir;
357
+ constructor(layer: Layer, gitDir: string);
358
+ readRef(ref: string): Promise<string | null>;
359
+ readSymbolicRef(ref: string): Promise<string | null>;
360
+ resolveRef(ref: string): Promise<string>;
361
+ private resolveRefInner;
362
+ expandRef(shortName: string): Promise<string>;
363
+ writeRef(ref: string, oid: string): Promise<void>;
364
+ writeSymbolicRef(ref: string, target: string): Promise<void>;
365
+ deleteRef(ref: string): Promise<void>;
366
+ listRefs(prefix?: string): Promise<RefEntry[]>;
367
+ private listLooseRefs;
368
+ private readPackedRef;
369
+ private readAllPackedRefs;
370
+ private removeFromPackedRefs;
371
+ }
372
+
373
+ declare class IndexFile {
374
+ private layer;
375
+ private gitDir;
376
+ entries: IndexEntry[];
377
+ constructor(layer: Layer, gitDir: string);
378
+ read(): Promise<void>;
379
+ parse(data: Uint8Array): void;
380
+ write(): Promise<void>;
381
+ serialize(): Promise<Uint8Array>;
382
+ addEntry(entry: IndexEntry): void;
383
+ removeEntry(path: string): void;
384
+ removeEntriesUnder(dirPath: string): void;
385
+ getEntry(path: string, stage?: number): IndexEntry | undefined;
386
+ hasConflicts(): boolean;
387
+ getConflictedPaths(): string[];
388
+ clearConflictEntries(path: string): void;
389
+ private sortEntries;
390
+ }
391
+
392
+ interface ConfigSection {
393
+ name: string;
394
+ subsection?: string;
395
+ entries: Array<{
396
+ key: string;
397
+ value: string;
398
+ }>;
399
+ }
400
+ declare class GitConfig {
401
+ private layer;
402
+ private gitDir;
403
+ private sections;
404
+ private loaded;
405
+ constructor(layer: Layer, gitDir: string);
406
+ load(): Promise<void>;
407
+ save(): Promise<void>;
408
+ get(key: string): string | undefined;
409
+ getAll(key: string): string[];
410
+ set(key: string, value: string): void;
411
+ delete(key: string): boolean;
412
+ deleteSection(sectionKey: string): boolean;
413
+ parseConfig(content: string): ConfigSection[];
414
+ serialize(): string;
415
+ private parseKey;
416
+ }
417
+
418
+ declare class GitIgnore {
419
+ private layer;
420
+ private workDir;
421
+ private rules;
422
+ constructor(layer: Layer, workDir: string);
423
+ load(): Promise<void>;
424
+ loadNested(dirPath: string): Promise<void>;
425
+ private loadFile;
426
+ parseRules(content: string, basePath: string): void;
427
+ isIgnored(path: string, isDirectory?: boolean): boolean;
428
+ addRules(content: string, basePath?: string): void;
429
+ }
430
+
431
+ declare class DiffEngine {
432
+ private layer;
433
+ private workDir;
434
+ private objectDB;
435
+ private indexFile;
436
+ private refStore;
437
+ private gitDir;
438
+ constructor(layer: Layer, workDir: string, objectDB: ObjectDB, indexFile: IndexFile, refStore: RefStore, gitDir: string);
439
+ diff(options?: DiffOptions): Promise<DiffResult>;
440
+ private diffWorkingTree;
441
+ private diffCached;
442
+ private diffRefs;
443
+ getHeadTree(): Promise<Map<string, string>>;
444
+ private getTreeForRef;
445
+ getTreeForCommit(commitOid: string): Promise<Map<string, string>>;
446
+ flattenTree(treeOid: string, prefix: string): Promise<Map<string, string>>;
447
+ /**
448
+ * Look up the OID of a specific path in a tree without flattening
449
+ * the entire tree. Walks tree objects one path segment at a time.
450
+ * Returns null if the path does not exist in the tree.
451
+ */
452
+ lookupPathInTree(treeOid: string, filePath: string): Promise<string | null>;
453
+ /**
454
+ * Get the OID of a specific path in a commit's tree.
455
+ * Returns null if the path does not exist.
456
+ */
457
+ getPathOidInCommit(commitOid: string, filePath: string): Promise<string | null>;
458
+ private createDiffFile;
459
+ private readBlob;
460
+ }
461
+ declare function computeDiffHunks(oldContent: string, newContent: string, contextLines?: number): DiffHunk[];
462
+
463
+ declare class MergeEngine {
464
+ private layer;
465
+ private workDir;
466
+ private gitDir;
467
+ private objectDB;
468
+ private indexFile;
469
+ private refStore;
470
+ private diffEngine;
471
+ constructor(layer: Layer, workDir: string, gitDir: string, objectDB: ObjectDB, indexFile: IndexFile, refStore: RefStore, diffEngine: DiffEngine);
472
+ findMergeBase(oid1: string, oid2: string): Promise<string | null>;
473
+ merge(oursOid: string, theirsOid: string, message: string, author: GitIdentityFull, committer: GitIdentityFull): Promise<MergeResult>;
474
+ buildTreeFromPaths(paths: Map<string, string>): Promise<string>;
475
+ private writeTreeNode;
476
+ private readBlobText;
477
+ private addConflictEntry;
478
+ private createIndexEntry;
479
+ }
480
+
481
+ declare class StashManager {
482
+ private layer;
483
+ private workDir;
484
+ private gitDir;
485
+ private objectDB;
486
+ private indexFile;
487
+ private refStore;
488
+ private diffEngine;
489
+ private mergeEngine;
490
+ constructor(layer: Layer, workDir: string, gitDir: string, objectDB: ObjectDB, indexFile: IndexFile, refStore: RefStore, diffEngine: DiffEngine, mergeEngine: MergeEngine);
491
+ push(message: string, author: GitIdentityFull, includeUntracked?: boolean): Promise<string>;
492
+ apply(index?: number): Promise<void>;
493
+ pop(index?: number): Promise<void>;
494
+ drop(index?: number): Promise<void>;
495
+ list(): Promise<StashEntry[]>;
496
+ private pushStashRef;
497
+ private writeStashList;
498
+ private buildIndexTree;
499
+ private buildWorkingTree;
500
+ /**
501
+ * Recursively collects all file paths in the working directory,
502
+ * excluding .git directories.
503
+ */
504
+ private collectWorkingTreePaths;
505
+ private resetToHead;
506
+ private getCurrentBranchName;
507
+ }
508
+
509
+ declare class Repository {
510
+ readonly workDir: string;
511
+ readonly gitDir: string;
512
+ readonly objectDB: ObjectDB;
513
+ readonly refStore: RefStore;
514
+ readonly indexFile: IndexFile;
515
+ readonly config: GitConfig;
516
+ readonly ignore: GitIgnore;
517
+ readonly diffEngine: DiffEngine;
518
+ readonly mergeEngine: MergeEngine;
519
+ readonly stashManager: StashManager;
520
+ private transport;
521
+ constructor(layer: Layer, workDir?: string);
522
+ private _layer;
523
+ setTransport(transport: GitTransport): void;
524
+ load(): Promise<void>;
525
+ currentBranch(): Promise<string | null>;
526
+ createBranch(name: string, options?: CreateBranchOptions): Promise<void>;
527
+ deleteBranch(name: string, options?: DeleteBranchOptions): Promise<void>;
528
+ listBranches(options?: ListBranchesOptions): Promise<BranchInfo[]>;
529
+ renameBranch(oldName: string, newName: string): Promise<void>;
530
+ checkout(ref: string, options?: CheckoutOptions): Promise<void>;
531
+ /**
532
+ * Update working tree and index to match the given commit OID,
533
+ * without changing HEAD's symbolic ref. Used by merge to avoid
534
+ * accidentally switching branches.
535
+ */
536
+ private updateWorkingTreeToCommit;
537
+ add(pathOrPaths: string | string[]): Promise<void>;
538
+ private addDirectory;
539
+ unstage(pathOrPaths: string | string[]): Promise<void>;
540
+ remove(pathOrPaths: string | string[], options?: RemoveOptions): Promise<void>;
541
+ status(path?: string): Promise<StatusEntry[] | StatusEntry | null>;
542
+ private collectWorkingTreePaths;
543
+ listFiles(): Promise<string[]>;
544
+ isIgnored(path: string): Promise<boolean>;
545
+ commit(options: CommitOptions): Promise<string>;
546
+ log(options?: LogOptions): Promise<CommitInfo[]>;
547
+ readCommit(oid: string): Promise<CommitInfo>;
548
+ addRemote(name: string, url: string): Promise<void>;
549
+ listRemotes(): Promise<RemoteInfo[]>;
550
+ deleteRemote(name: string): Promise<void>;
551
+ fetch(remote: string, options?: FetchOptions): Promise<FetchResult>;
552
+ pull(remote: string, options?: PullOptions): Promise<MergeResult>;
553
+ push(remote: string, options?: PushOptions): Promise<PushResult>;
554
+ private collectObjectsForPush;
555
+ private storePackData;
556
+ merge(ref: string, options?: MergeOptions): Promise<MergeResult>;
557
+ abortMerge(): Promise<void>;
558
+ createTag(name: string, options?: CreateTagOptions): Promise<void>;
559
+ deleteTag(name: string): Promise<void>;
560
+ listTags(): Promise<TagInfo[]>;
561
+ diff(options?: DiffOptions): Promise<DiffResult>;
562
+ stash(options?: StashOptions): Promise<void>;
563
+ listStashes(): Promise<StashEntry[]>;
564
+ applyStash(options?: ApplyStashOptions): Promise<void>;
565
+ popStash(options?: ApplyStashOptions): Promise<void>;
566
+ dropStash(index?: number): Promise<void>;
567
+ getConfig(key: string): Promise<string | null>;
568
+ setConfig(key: string, value: string): Promise<void>;
569
+ deleteConfig(key: string): Promise<void>;
570
+ resolveRef(ref: string): Promise<string>;
571
+ listRefs(prefix?: string): Promise<RefEntry[]>;
572
+ setUpstream(branch: string, upstream: string): Promise<void>;
573
+ reset(ref: string, options?: ResetOptions): Promise<void>;
574
+ /**
575
+ * Resolve ref expressions like HEAD~1, HEAD~3, HEAD^, main~2, etc.
576
+ */
577
+ private resolveRefExpression;
578
+ private resetIndex;
579
+ private resetHard;
580
+ private buildIdentity;
581
+ buildTreeFromIndex(): Promise<string>;
582
+ }
583
+
584
+ interface HttpTransportOptions {
585
+ auth?: {
586
+ username: string;
587
+ password: string;
588
+ };
589
+ headers?: Record<string, string>;
590
+ }
591
+ declare class HttpTransport implements GitTransport {
592
+ private headers;
593
+ constructor(options?: HttpTransportOptions);
594
+ discover(url: string, service: "git-upload-pack" | "git-receive-pack"): Promise<TransportDiscoveryResult>;
595
+ parseDiscovery(data: Uint8Array, service: string): TransportDiscoveryResult;
596
+ fetch(url: string, request: TransportFetchRequest): Promise<TransportFetchResponse>;
597
+ buildFetchRequest(request: TransportFetchRequest): Uint8Array;
598
+ parseFetchResponse(data: Uint8Array): TransportFetchResponse;
599
+ push(url: string, request: TransportPushRequest): Promise<TransportPushResponse>;
600
+ buildPushRequest(request: TransportPushRequest): Uint8Array;
601
+ parsePushResponse(data: Uint8Array): TransportPushResponse;
602
+ }
603
+
604
+ type GitErrorCode = "NOT_A_GIT_REPO" | "ALREADY_EXISTS" | "NOT_FOUND" | "DIRTY_WORKING_TREE" | "NOTHING_TO_COMMIT" | "NOTHING_TO_STASH" | "DETACHED_HEAD" | "CURRENT_BRANCH" | "NON_FAST_FORWARD" | "TRANSPORT_ERROR" | "INVALID_OBJECT" | "UNRESOLVED_CONFLICT" | "BRANCH_NOT_FULLY_MERGED" | "NOT_MERGING" | "REPO_NOT_EMPTY";
605
+ declare class GitError extends Error {
606
+ readonly code: GitErrorCode;
607
+ constructor(code: GitErrorCode, message: string);
608
+ }
609
+
610
+ declare function initRepository(layer: Layer, options?: InitOptions): Promise<Repository>;
611
+ declare function openRepository(layer: Layer): Promise<Repository>;
612
+ declare function cloneRepository(layer: Layer, options: CloneOptions): Promise<Repository>;
613
+ declare function httpTransport(options?: HttpTransportOptions): HttpTransport;
614
+
615
+ export { type ApplyStashOptions, type BranchInfo, type CheckoutOptions, type CloneOptions, type CommitInfo, type CommitOptions, type CreateBranchOptions, type CreateTagOptions, type DeleteBranchOptions, DiffEngine, type DiffFile, type DiffHunk, type DiffLine, type DiffOptions, type DiffResult, type FetchOptions, type FetchResult, GitConfig, GitError, type GitErrorCode, type GitIdentity, type GitIdentityFull, GitIgnore, type GitObject, type GitObjectType, type GitTransport, HttpTransport, type HttpTransportOptions, type IndexEntry, IndexFile, type InitOptions, type Layer, type ListBranchesOptions, type LogOptions, MergeEngine, type MergeOptions, type MergeResult, ObjectDB, type PullOptions, type PushOptions, type PushResult, type RefEntry, RefStore, type RemoteInfo, type RemoveOptions, Repository, type ResetOptions, type StashEntry, StashManager, type StashOptions, type StatusCode, type StatusEntry, type TagInfo, type TransportDiscoveryResult, type TransportFetchRequest, type TransportFetchResponse, type TransportPushRequest, type TransportPushResponse, type TreeEntry, cloneRepository, computeDiffHunks, formatIdentity, httpTransport, initRepository, openRepository, parseIdentity };