loader: Ensure to fetch latest snapshot produced by a git visit type
SWH data model allows an origin to have multiple visit types, in particular a git origin can have visit types 'git' and 'git-checkout'. We must ensure to retrieve the latest snapshot for a git visit type in the git loader implementation as it can break incremental loading of a git origin having both visit types mentioned above. Indeed a 'git-checkout' visit type produces a snapshot with a single branch while a 'git' visit type produces a snapshot containing all branches of the loaded repository. Previously, if the latest snapshot retrieved was produced by a 'git-checkout' visit type, the loader would refetch all branches and associated git objects while most of them have already been archived. Related to swh/meta#5092.
parent
93d43596
No related branches found
No related tags found
Checking pipeline status
Showing
- requirements-swh.txt 2 additions, 2 deletionsrequirements-swh.txt
- requirements-test.txt 2 additions, 2 deletionsrequirements-test.txt
- swh/loader/git/loader.py 5 additions, 1 deletionswh/loader/git/loader.py
- swh/loader/git/tests/test_loader.py 8 additions, 8 deletionsswh/loader/git/tests/test_loader.py
Loading
Please register or sign in to comment