Skip to content
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

Send git commit message to stdout after ots git wrapper failure #49

Open
kanzure opened this issue May 26, 2017 · 9 comments
Open

Send git commit message to stdout after ots git wrapper failure #49

kanzure opened this issue May 26, 2017 · 9 comments

Comments

@kanzure
Copy link
Contributor

kanzure commented May 26, 2017

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.

@petertodd
Copy link
Member

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.

@kanzure
Copy link
Contributor Author

kanzure commented Jul 27, 2017

Alternative solution: always use gt commit and then sign with git commit --amend -S.

@petertodd
Copy link
Member

Along those lines, maybe make the ots-git-commit thing leave a signed but non-timestamped git commit the OTS part fails?

@omarshibli
Copy link

but then would probably need another utility to reconcile the non-timestamped commits, otherwise you might introduce inconsistencies in the expected signatures structure.

@petertodd
Copy link
Member

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.

@omarshibli
Copy link

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.

@petertodd
Copy link
Member

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.

@omarshibli
Copy link

makes sense, thanks for the input.

@kanzure
Copy link
Contributor Author

kanzure commented Jan 20, 2020

Just realized this is a dupe of #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants