Skip to content

Commit f3e8912

Browse files
feat: Add automatic git staging before commit in PatchClient
- Introduced a new step to stage all changes using 'git add .' before committing - Added console logging and progress callback for the staging process - Ensures all modified files are included in the subsequent commit
1 parent c076ccb commit f3e8912

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/patch.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,13 @@ export class PatchClient {
795795
};
796796
}
797797

798+
// Stage all changes before committing
799+
console.log('Staging changes...');
800+
if (progressCallback) {
801+
progressCallback('staging', {});
802+
}
803+
await this.executeCommand('git', ['add', '.']);
804+
798805
// Commit changes
799806
console.log('Committing changes...');
800807
if (progressCallback) {

0 commit comments

Comments
 (0)