mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 05:55:17 -07:00
Provide a .gitconfig for shadow repos (#1294)
This commit is contained in:
@@ -188,6 +188,18 @@ describe('GitService', () => {
|
||||
const repoDir = path.join(mockHomedir, '.gemini', 'history', mockHash);
|
||||
const hiddenGitIgnorePath = path.join(repoDir, '.gitignore');
|
||||
const visibleGitIgnorePath = path.join(mockProjectRoot, '.gitignore');
|
||||
const gitConfigPath = path.join(repoDir, '.gitconfig');
|
||||
|
||||
it('should create a .gitconfig file with the correct content', async () => {
|
||||
const service = new GitService(mockProjectRoot);
|
||||
await service.setupShadowGitRepository();
|
||||
const expectedConfigContent =
|
||||
'[user]\n name = Gemini CLI\n email = gemini-cli@google.com\n[commit]\n gpgsign = false\n';
|
||||
expect(hoistedMockWriteFile).toHaveBeenCalledWith(
|
||||
gitConfigPath,
|
||||
expectedConfigContent,
|
||||
);
|
||||
});
|
||||
|
||||
it('should create history and repository directories', async () => {
|
||||
const service = new GitService(mockProjectRoot);
|
||||
|
||||
Reference in New Issue
Block a user