Files snapshot from file-caching
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
268685 Tucker McKnight
929902 Tucker McKnight
929902 Tucker McKnight
929902 Tucker McKnight
bc3cc7 Tucker McKnight
929902 Tucker McKnight
929902 Tucker McKnight
01b859 Tucker McKnight
4eaa3d Tucker McKnight
4eaa3d Tucker McKnight
4eaa3d Tucker McKnight
b30bd9 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
929902 Tucker McKnight
782f36 Tucker McKnight
929902 Tucker McKnight
929902 Tucker McKnight
cdb797 Tucker McKnight
929902 Tucker McKnight
782f36 Tucker McKnight
7e40e5 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
cdb797 Tucker McKnight
929902 Tucker McKnight
f0856f Tucker McKnight
929902 Tucker McKnight
929902 Tucker McKnight
fb82fe Tucker McKnight
bc3cc7 Tucker McKnight
bc3cc7 Tucker McKnight
bc3cc7 Tucker McKnight
bc3cc7 Tucker McKnight
bc3cc7 Tucker McKnight
bc3cc7 Tucker McKnight
929902 Tucker McKnight
929902 Tucker McKnight
88b515 Tucker McKnight
88b515 Tucker McKnight
88b515 Tucker McKnight
88b515 Tucker McKnight
88b515 Tucker McKnight
88b515 Tucker McKnight
import { type BlameInfo } from "./vcses/git/operations.ts"
export type FileInfo = {
contents: string,
lastModified: Date,
blameLines: Array<BlameInfo>,
}
export type Repository = {
name: string,
description?: string,
cloneUrl: string,
defaultBranch: string,
branches: Array<{
name: string,
description?: string,
ahead: number,
behind: number,
compareTo: string,
sha: string,
// instead of strings, make it point to a function that returns
// the file contents. The first time, search in both directions for a commit
// that has already cached this file before a diff in that commit mentions
// this filename. If one is found, return the *object* in the cached file
// map (so that it returns a reference). Also set that in a const inside
// the function so that we don't have to compute it again.
// If one is not found, then `cat` the file and save it in the commit
// cache.
fileList: Map<string, {fileInfo: FileInfo}>,
}>,
tags?: Array<{
name: string,
sha: string,
fileList: Map<string, {fileInfo: FileInfo}>,
}>,
commits?: Map<string, {
hash: string,
// TODO: put cached files map in here. Save file as an object
// so that it gets saved by reference.
cachedFiles: Map<string, FileInfo>,
message: string,
isMerge: boolean,
author: string,
date: Date,
parent: string | null,
diffs: Array<{
fileName: string,
lineNumber: number,
beforeText: string,
afterText: string,
}>
}>,
}
export type SortedFileList = Array<{
name: string,
fullPath: string,
isDirectory: boolean,
}>