MCPcopy Create free account
hub / github.com/anus-dev/ANUS / shadowGitRepository

Method shadowGitRepository

packages/core/src/services/gitService.ts:92–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90 }
91
92 private get shadowGitRepository(): SimpleGit {
93 const repoDir = this.getHistoryDir();
94 return simpleGit(this.projectRoot).env({
95 GIT_DIR: path.join(repoDir, '.git'),
96 GIT_WORK_TREE: this.projectRoot,
97 // Prevent git from using the user's global git config.
98 HOME: repoDir,
99 XDG_CONFIG_HOME: repoDir,
100 });
101 }
102
103 async getCurrentCommitHash(): Promise<string> {
104 const hash = await this.shadowGitRepository.raw('rev-parse', 'HEAD');

Callers

nothing calls this directly

Calls 1

getHistoryDirMethod · 0.95

Tested by

no test coverage detected