You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
why:
- Previously, enabling SSH-style URL detection mutated libvcs’s DEFAULT_RULES on import and lost the rule’s original metadata.
- Users couldn’t cleanly disable the patch or restore upstream defaults if libvcs changed.
- Implicit module-import side-effects are harder to reason about.
what:
- Introduce private `_orig_rule_meta` to snapshot rule’s original metadata.
- Store original metadata on first enable and apply `(True, 100)`.
- Restore saved metadata (or safe defaults) on disable, clearing snapshot.
- Remove auto-patch on import; require explicit call.
- Add `ssh_style_url_detection` context manager.
- Call `enable_ssh_style_url_detection()` in `update_repo()` to maintain behavior.
- Add pytest tests for enable/disable roundtrip and context manager.
0 commit comments