swh.loader.git.converters module#
Convert dulwich objects to dictionaries suitable for swh.storage
- swh.loader.git.converters.COMMIT_MODE_MASK = 57344#
Mode/perms of tree entries that point to a commit. They are normally equal to this mask, but may have more bits set to 1.
- swh.loader.git.converters.TREE_MODE_MASK = 16384#
Mode/perms of tree entries that point to a tree. They are normally equal to this mask, but may have more bits set to 1.
- swh.loader.git.converters.check_id(obj: BaseHashableModel) None [source]#
- swh.loader.git.converters.dulwich_blob_to_content_id(obj: ShaFile) Dict[str, Any] [source]#
Convert a dulwich blob to a Software Heritage content id
- swh.loader.git.converters.dulwich_blob_to_content(obj: ShaFile, max_content_size=None) BaseContent [source]#
Convert a dulwich blob to a Software Heritage content
- swh.loader.git.converters.dulwich_tree_to_directory(obj: ShaFile) Directory [source]#
Format a tree as a directory