-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Add accountability to issue edits #91
base: master
Are you sure you want to change the base?
Conversation
Archive and fingerprint previous issue edit for faster rendering of single issue history. Signature on fingerprint. All optional. Commit as object for feature discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! Not sure how this will make the history faster. Isn't git log
on the issue's directory fast enough?
I also don't understand how this is / can-be a plugin, given that you call directly archive_by_path
.
I added some comments for improving the code.
# signature message is the signature of the TAR archive wrapping the three items, added in the sequence defined by archive_by_path | ||
gpg_key=$(git config --get user.signingKey) | ||
if [ -z "$gpg_key" ]; then | ||
echo "no gpg key" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo 'No GPG key' 1>&2
opt_archive=1 | ||
opt_sign=1 | ||
|
||
sig_by_state() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment describing what this function does. Consider also expanding sig
.
h=$(sha1sum a.tar.gz | awk '{ print $1; }') | ||
popd | ||
mv -v $t/a.tar.gz $path/${now}_${h}.tar.gz | ||
sig_by_state $1 $h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please eliminate the -v
options to tar, cp, mv. By default the operation should be silent.
Thanks, this looks perfect for a small, personal issues use-case.
Before I'd start using this, I would need some things:
The current state of this PR is meant as a proposal for an initial albeit brittle implementation of this feature.
You'll find my contacts via my profile if you wanna discuss off-platform :)