opentimestamps-client
opentimestamps-client copied to clipboard
Send git commit message to stdout after ots git wrapper failure
When the calendar servers are offline, signing with git commit -S
leads to losing the commit message. Send the git commit message to stdout so that the author doesn't have to write a new message when retrying.
Sounds like a good idea - git has this problem too in some cases. Though would writing the commit to a temporary file be better?
Also, the calendar servers are essentially never offline for me, so something odd is going on if you're getting that problem... Myself, I run into this same issue occasionally, but due to the PGP signing failing for various reasons like my smart card reader acting up.
Alternative solution: always use gt commit
and then sign with git commit --amend -S
.
Along those lines, maybe make the ots-git-commit thing leave a signed but non-timestamped git commit the OTS part fails?
but then would probably need another utility to reconcile the non-timestamped commits, otherwise you might introduce inconsistencies in the expected signatures structure.
What do you mean by "reconcile"?
The way I'd handle that is to have the error message suggest to the user that then do "git commit --amend --reset-author -S" again, which would re-sign the commit, reusing the commit message but resetting the exact date on the commit.
By that I mean fix the inconsistencies if they occur, for example, if I have git stamping enabled, and for somehow the command failed to stamp it several times, let's say 5 commits out of 10, later on the network connection is back up, I want to fix the 5 commits signatures, how would i do this? do I need to cherry pick? I would rather have a tool/command that detects inconsistent signatures and fix it.
But that's the thing: you can't fix the missing timestamps after the fact, because the point of the timestamp is they can't be backdated.
What you can do, is timestamp the most recent commit, which git commit --amend -S
will do. If you need to add signatures to each git commit prior to the most recent, you can do that with git rebase -i
, but for most workflows a signature on one commit is good enough - it signs all prior commits remember.
makes sense, thanks for the input.
Just realized this is a dupe of #29