Support sha256 in backups
Backups use the CreateRepository
RPC to create repos to be restored, once created each backup bundle is applied in order. The problem is that in order to properly support a mixed sha1/sha256 environment, this CreateRepository
call must be called with the correct object hash type.
We need to determine an efficient way to be able to give the object hash type of the repository
- Use the bundle - Cannot be used because empty repositories still need their object hash type set, but empty repos have no bundle.
- Use the ref list - Determining the object hash type by inferring it from hashes is too fragile? Also has problems with empty repositories.
- Write a object type file in the backup - This might be the most simple change, though the backup code must be able to handle this file not existing (so that historic backups continue to work).
- Begin writing repository backup manifest files - This is likely what we need to properly support WORM anyway (so that existing backups cannot be modified silently). So perhaps we could start writing these manifests now.
- Backup git config - I think since we no longer support adding user configs to config, this probably isn't the way forward.
Edited by James Fargher