Revision 29312dff6d96ac1c9bc18bf98de1d2e27a76c334 authored by David Douard on 19 May 2020, 14:04:30 UTC, committed by David Douard on 20 May 2020, 14:28:01 UTC
Simply add a BaseModel.anonymize() method. Default implementation returns
None, meaning the object is not anonymizable.

For Person, the method returns a Person whith hashed fullname (and unset
name and email).

For Revision and Release, the method returns an anonymized version of
the object, i.e. with instance of Person replaced by anonymized ones.
1 parent cce3036
Raw File
git-revhash
#!/usr/bin/env bash

# Use
# git-revhash 'tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nparent 22c0fa5195a53f2e733ec75a9b6e9d1624a8b771\nauthor seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\ncommitter seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\n\nmaking dir structure...\n'  # noqa
# output: 17a631d474f49bbebfdf3d885dcde470d7faafd7

echo -ne $* | git hash-object --stdin -t commit
back to top