MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / staleStatInfo

Function staleStatInfo

__tests__/git-status-optional-locks.test.ts:28–31  ·  view source on GitHub ↗

Give a tracked file new stat info with the same content, so status has an entry to refresh.

(file: string, offsetSec: number)

Source from the content-addressed store, hash-verified

26
27/** Give a tracked file new stat info with the same content, so status has an entry to refresh. */
28function staleStatInfo(file: string, offsetSec: number): void {
29 const when = new Date(Date.now() - offsetSec * 1000);
30 fs.utimesSync(file, when, when);
31}
32
33describe('change detection never takes the git index lock (#3295)', () => {
34 let root: string;

Calls

no outgoing calls

Tested by

no test coverage detected