mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-02 01:11:24 -07:00
This commit is contained in:
@@ -283,6 +283,25 @@ describe('GitService', () => {
|
||||
expect.stringContaining('checkIsRepo failed'),
|
||||
);
|
||||
});
|
||||
|
||||
it('should configure git environment to use local gitconfig', async () => {
|
||||
hoistedMockCheckIsRepo.mockResolvedValue(false);
|
||||
const service = new GitService(projectRoot, storage);
|
||||
await service.setupShadowGitRepository();
|
||||
|
||||
expect(hoistedMockEnv).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
GIT_CONFIG_GLOBAL: gitConfigPath,
|
||||
GIT_CONFIG_SYSTEM: path.join(repoDir, '.gitconfig_system_empty'),
|
||||
}),
|
||||
);
|
||||
|
||||
const systemConfigContent = await fs.readFile(
|
||||
path.join(repoDir, '.gitconfig_system_empty'),
|
||||
'utf-8',
|
||||
);
|
||||
expect(systemConfigContent).toBe('');
|
||||
});
|
||||
});
|
||||
|
||||
describe('createFileSnapshot', () => {
|
||||
|
||||
Reference in New Issue
Block a user