Close go-git repository handles across store operations and tests to avoid
leaked handles blocking recovery cleanup. Abort recovery before mutating the
worktree when close failures occur and retain backups when rollback fails.
- Added safeguards against repository corruption with improved recovery mechanisms, including remote re-cloning and worktree restoration.
- Introduced fine-grained repository integrity checks and missing file restoration logic.
- Centralized repository locking with `ensureRepositoryLocked` to standardize synchronization.
- Enhanced conflict resolution during pulls with automated reconciliation of remote and local changes.
- Improved worktree and index reset workflows to handle dirty and missing paths gracefully.
- Increased robustness for garbage collection with extended grace period and recovery paths.
Closes: #4629
- Updated git operations to leverage `ClientOptions` for authentication and configuration, replacing the deprecated `AuthMethod`.
- Implemented logic to disable GPG commit signing in repositories to prevent signature errors in automated workflows.
- Upgraded dependencies in `go.mod` and `go.sum` to align with the latest `github.com/go-git/go-git/v6` alpha releases.
- Added unit tests to verify commit signing is properly disabled in repositories.
Closes: #4341
- Updated `maybeRunGC` to accept `repoDir` instead of `repo`.
- Moved garbage collection trigger to occur after the push step for improved reliability.
- Added a test to validate the sequence of push and GC operations.
Closes: #3373