Commit 4c9dee5
committed
fix(sync/git[remote]) Restore LibVCSException resilience
why: ``GitSync.remote()`` previously wrapped the underlying subprocess
call in ``try / except LibVCSException: return None`` so a corrupt
``.git/config`` or a locked file did not crash a ``vcspull sync``. The
``git remote show`` -> ``git remote -v`` rewrite dropped the wrapper,
so subprocess failures now leak as ``CommandError`` instead of degrading
gracefully.
what:
- Wrap ``self.cmd.remotes.get()`` in ``try / except exc.LibVCSException``
and return ``None`` to preserve the old resilience contract.
- Document the suppression in the Notes block so future readers see why
the wrapper exists.
- Add a regression test that mocks ``cmd.remotes.get`` to raise
``CommandError`` and asserts ``remote()`` returns ``None``.1 parent 0d99779 commit 4c9dee5
2 files changed
Lines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
679 | | - | |
| 679 | + | |
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
686 | 692 | | |
687 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
688 | 697 | | |
689 | 698 | | |
690 | 699 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1709 | 1709 | | |
1710 | 1710 | | |
1711 | 1711 | | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
0 commit comments