MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / initialize

Method initialize

services/app-builder/src/git-repository-do.ts:69–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 async initialize(): Promise<void> {
70 return withLogTags(
71 { source: 'GitRepositoryDO', tags: { appId: this.ctx.id.name } },
72 async () => {
73 if (!this.fs) {
74 await this.initializeFS();
75 }
76
77 if (this._initialized) {
78 logger.debug('Repository already initialized');
79 return;
80 }
81
82 logger.debug('Initializing new git repository');
83
84 if (!this.fs) {
85 throw new Error('Filesystem not initialized');
86 }
87
88 await git.init({ fs: this.fs, dir: '/', defaultBranch: 'main' });
89 this._initialized = true;
90
91 logger.debug('Git repository initialized successfully');
92 }
93 );
94 }
95
96 /**
97 * Files are expected to have base64-encoded content to safely handle binary data through RPC

Callers 4

createInitialCommitMethod · 0.95
importGitObjectsMethod · 0.95
handleInfoRefsFunction · 0.45
handleReceivePackFunction · 0.45

Calls 3

initializeFSMethod · 0.95
debugMethod · 0.65
initMethod · 0.45

Tested by

no test coverage detected