HomeSoftware Heritage

swh.storage: Allow storage of extra git headers in revisions

Description

swh.storage: Allow storage of extra git headers in revisions

We store the extra git headers (bytes) in the
metadata->'extra_git_headers' field of the revision.

The values are decoded as if they were utf-8 strings. When an invalid
sequence is encountered, the bytes are encoded as a \x escape. We also
encode NUL bytes as such, as U+0000 is invalid in a JSON string and
can't be stored in PostgreSQL.

Details

Provenance
olasdAuthored on Feb 10 2016, 12:22 PM
olasdPushed on Feb 10 2016, 12:24 PM
Parents
rDSTO26ce6d8c9744: sql/swh-schema: add some constraints to occurrence{_history,}
Branches
Unknown
Tags
Unknown