mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-22 08:38:08 +02:00
fix: keep git maintenance attached in local repos
This commit is contained in:
parent
7287e4907b
commit
df887fe92d
2 changed files with 14 additions and 1 deletions
|
|
@ -105,6 +105,12 @@ export class GitService {
|
|||
this.logger.log('Initialized git repository');
|
||||
}
|
||||
|
||||
// Keep any auto-maintenance triggered by writes in-process. Detached maintenance can
|
||||
// keep object-pack directories alive briefly after awaited git commands complete,
|
||||
// which makes temp-project cleanup flaky in CI.
|
||||
await this.git.addConfig('gc.autoDetach', 'false');
|
||||
await this.git.addConfig('maintenance.autoDetach', 'false');
|
||||
|
||||
// Ensure HEAD always resolves to a commit so callers (e.g., the memory-agent squash flow)
|
||||
// can rely on `revParseHead()` returning a SHA. Idempotent: skip if HEAD already exists.
|
||||
const head = await this.revParseHead();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue