MCPcopy Create free account
hub / github.com/SethGammon/Citadel / runReset

Function runReset

scripts/watch.js:643–655  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

641}
642
643function runReset() {
644 if (!acquireLock()) {
645 console.error('[watch] Could not acquire state lock; a scan may be running. Try again shortly.');
646 process.exit(1);
647 }
648 try {
649 writeState(defaultState());
650 } finally {
651 releaseLock();
652 }
653 console.log('[watch] State reset. Next scan will use HEAD~1 as baseline.');
654 process.exit(0);
655}
656
657// -- Main ---------------------------------------------------------------------
658

Callers 1

mainFunction · 0.85

Calls 4

acquireLockFunction · 0.85
defaultStateFunction · 0.85
releaseLockFunction · 0.85
writeStateFunction · 0.70

Tested by

no test coverage detected