Add the diff to commit message for auto-created git commits
#1,343 opened on Mar 11, 2020
Repository metrics
- Stars
- (6,624 stars)
- PR merge metrics
- (Avg merge 12d 19h) (6 merged PRs in 30d)
Description
Currently, when doing a push, UCM creates messages like 'Sync branch ' which is not super informative. It is useful to know the namespace hash but it would be nice to know the diff from the previous version as well.
The message comes from here:
But actually, right in that function we have all we need to be able to at least print out the names diff:
Printing out the full namespace diff with type signatures etc can be a later project, but there's an easy win here. Just use OutputMessages.prettyDiff to produce a Pretty, which you can convert to text with Pretty.toPlain 80 or whatever width we want to render it at.
I'm not totally sure best way to pass the commit message to git since it's not one line. I guess create a temporary file and pass that file as the commit comment?