mirror of
https://github.com/stablyai/orca.git
synced 2026-11-18 11:54:46 +00:00
* refactor(git): share the .gitattributes ancestor stamp paths * perf(git): reuse the branch-compare changed-files list per commit pair * perf(git): charge cached change lists for the stdout their paths retain * perf(git): bound branch change-list reuse to five minutes for unstamped system attributes * refactor(git): share the deadline-bounded stamp probe * perf(git): bound branch change-list attribute stamps by a 2s deadline and 4096 paths
8 lines
393 B
TypeScript
8 lines
393 B
TypeScript
/** Add every in-tree `.gitattributes` Git consults for a repo-relative path: the root one and each ancestor's. */
|
|
export function addGitattributesStampPaths(target: Set<string>, repoPath: string): void {
|
|
target.add('.gitattributes')
|
|
for (let end = repoPath.indexOf('/'); end !== -1; end = repoPath.indexOf('/', end + 1)) {
|
|
target.add(`${repoPath.slice(0, end)}/.gitattributes`)
|
|
}
|
|
}
|