Page MenuHomeSoftware Heritage

git_bare: Statically check for exhaustiveness of enum matching
ClosedPublic

Authored by vlorentz on Aug 17 2021, 1:43 PM.

Diff Detail

Repository
rDVAU Software Heritage Vault
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D6105 (id=22088)

Could not rebase; Attempt merge onto 6ff71fb2c7...

Updating 6ff71fb..c269238
Fast-forward
 swh/vault/cookers/git_bare.py           | 107 +++++++++++++++++++++---------
 swh/vault/tests/test_git_bare_cooker.py | 114 +++++++++++++++++---------------
 2 files changed, 136 insertions(+), 85 deletions(-)
Changes applied before test
commit c2692385873aa9556cd06c194e0b65edf3878890
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Aug 17 13:43:09 2021 +0200

    git_bare: Statically check for exhaustiveness of enum matching
    
    Using this type narrowing trick:
    https://mypy.readthedocs.io/en/latest/literal_types.html#exhaustive-checks

commit 079a57b4d3cf39341413d87d13e5ffdf8aeb9e49
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Aug 17 13:06:01 2021 +0200

    git_bare: Add support for contents pointed by snapshots

See https://jenkins.softwareheritage.org/job/DVAU/job/tests-on-diff/168/ for more details.

This revision is now accepted and ready to land.Aug 17 2021, 2:23 PM