Skip to content

fix(session): validate existing repository before update - #116

Open
Aditya7880900936 wants to merge 1 commit into
open-gitagent:mainfrom
Aditya7880900936:fix/validate-existing-repo
Open

Aditya7880900936 wants to merge 1 commit into
open-gitagent:mainfrom
Aditya7880900936:fix/validate-existing-repo

Conversation

@Aditya7880900936

Copy link
Copy Markdown

Summary

  • Validate the existing repository's origin before updating a local repo session.
  • Prevent Git operations from running against an unrelated repository when repo.dir points to the wrong checkout.
  • Normalize common HTTPS and SSH repository URL formats before comparison.
  • Add a regression test covering repository mismatch.

Testing

  • npm run build ✅
  • npx tsx --test test/*.test.ts ✅
  • 77 tests passed, 0 failed.

Closes #85

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repo: mode: unsafe dir default can reset an unrelated parent git repo; unconditional push on every call with no read-only mode

1 participant