Skip to content

fix(mirror-dirs): restore source repo remotes after git-filter-repo#35

Open
utiberious wants to merge 1 commit intoutensil:mainfrom
utiberious:fix/mirror-dirs-restore-remotes
Open

fix(mirror-dirs): restore source repo remotes after git-filter-repo#35
utiberious wants to merge 1 commit intoutensil:mainfrom
utiberious:fix/mirror-dirs-restore-remotes

Conversation

@utiberious
Copy link
Copy Markdown
Contributor

Summary

  • Save source repo remotes before mirroring and restore them afterward, since git-filter-repo strips remotes from clones
  • Use --no-local on git clone to prevent hardlink object sharing between source and temporary clones
  • Format justfile with just --fmt

Test plan

  • Run just mirror-dirs on a repo with multiple remotes, verify source repo remotes are preserved
  • Verify --dry-run still works correctly

🤖 Generated with Claude Code

git-filter-repo strips remotes from clones, and local clones share
objects via hardlinks which can cause side effects on the source repo.

- Save source repo remotes before mirroring begins
- Use --no-local on git clone to avoid hardlink object sharing
- Restore any removed remotes on the source repo after mirroring
- Format with just --fmt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant