-
Notifications
You must be signed in to change notification settings - Fork 108
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
docs: add a guide for commit messages #686
Conversation
The list of currently used tags is generated from the repo and probably still contains some few that are inconsistent or unwanted. Help appreciated in weeding these out. |
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.
Just some small nitpicks. But this looks very good and is very helpful. Especially for newcomers. Thanks Gerwin
One thing I'm not sure about for the tags, are we more interested in the intention behind the commits or the specific files changed? |
Generally we want the intention. If it's cheap it's also good to be specific, though, because like you said it enables one to quickly see what has not changed. So in this specific case, I'd go for |
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.
Thanks for writing this up, it should be very helpful in us keeping a useful git history!
- You are trying to explain things to your future self or a future colleague | ||
5-10 years from now. You can assume knowledge of the repository in general, | ||
but you should not assume specific context that is obvious to you right now, | ||
but that will not be known to a different person 5 years from now. |
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.
I don't know if more emphasis is needed on not being lazy and/or doing header-only commits because they're "obvious". In theory yes, in practice would it really help ...
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.
The paragraph is probably long enough. I don't think more emphasis would achieve much.
If the change applies to many proofs, for instance large lemma renaming commits, | ||
we use tags such as `proof` and `spec`. | ||
|
||
We combine tags with `+` if a change applies to multiple parts, e.g. |
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.
There's another thing to consider on the line below, when to not combine lib and proof changes. I sometimes want to git show
the commit to see what was the relevant library change, and not see every update that could go into a proof: update for <whatever lib changes>
.
This is not a clear-cut line, because it means there is a broken commit between the two, but it's very useful and our proofs can't really be bisected anyway due to the horrible runtime. I'm interested in people's thoughts on this.
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.
I'd leave this outside the commit message guide, because it's more a question of what commits one should make. If the proof upadte is small, I think combining them makes sense, but if the proof update is large I also like the split version better, because it enables you to figure out more easily what content has actually changed in the spec.
I think this is excellent, especially given the very short production timeframe (and no comma/just avalanche! |
Have addressed the feedback and am planning to merge when the tests are through. Still happy to discuss further changes, the content is not set in stone. |
Add a guide for how to write commit messages and commit message tags to make the messages more consistent and to help new people on the project get started more quickly. Signed-off-by: Gerwin Klein <[email protected]>
Add a guide for how to write commit messages and commit message tags to make the messages more consistent and to help new people on the project get started more quickly.