fix: better handling of gitignore (once)

This commit is contained in:
2026-02-16 11:29:59 +01:00
parent 4695570c34
commit 4c437cbea2
4 changed files with 7 additions and 7 deletions

View File

@@ -135,7 +135,7 @@ export class GitEngine {
}
private async existingStageTargets(projectPath: string): Promise<string[]> {
const targets = ['posts', 'media', 'meta', '.gitattributes'];
const targets = ['posts', 'media', 'meta', 'thumbnails', '.gitattributes', '.gitignore'];
const existing: string[] = [];
for (const target of targets) {
@@ -383,6 +383,8 @@ export class GitEngine {
}
}
await this.ensureGitignore(projectPath);
const stageTargets = await this.existingStageTargets(projectPath);
if (stageTargets.length === 0) {
emitProgress('staging-files', 75, 'Staging project files...', 'no target files found');

View File

@@ -49,8 +49,6 @@ export const GitSidebar: React.FC = () => {
return;
}
await window.electronAPI.git.ensureGitignore(resolvedProjectPath);
const repoState = await window.electronAPI.git.getRepoState(resolvedProjectPath);
setIsRepo(repoState.isRepo);
setCurrentBranch(repoState.currentBranch || null);