Add the command line tool
`dump-things-gitaudit-rebuild-index`. It
can be used to rebuild indices of gitaudit
databases.
This is only useful for maintenance operations.
The gitaudit-backend code will automatically
build indices, if they are not existing.
The gitaudit-backend will now rebuild an index
if no index is found in a backend (or if requested
to do so).
To ensure that indexes can be rebuild the interface
was changed. Record-IDs are now read from the
records themselve, i.e. from `record["pid"]`. This
ensures that the IDs in the index are the same as
the IDs in the persisted records.
This commit changes the output format of
`dump-things-gitaudit-report` to JSONl. Each record
is self contained, i.e., it contains the record ID,
time-stamp, user-id, diff, and resulting record.
This allows to process individual lines without keeping
track of large dictionaries that spawn the complete
output.
`dump-things-report-gitaudit` is renamed to
`dump-things-gitaudit-report`. This will lead
to better command names, when more commands are
introduced that work with `gitaudit`-backends,
e.g., `dump-things-gitaudit-rebuild-index`.
Generally audit-backend commands should be named
according to the following schema:
`dump-things-<audit-backend-type>-<command>`
This commit adds an index to the gitaudit backend that
contains the IDs of all records that were added to the
audit log. This allows to search through IDs.