Automatic git commit messages #155
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've been working on #96 lately and have been struggling to remember the de facto git commit message format for tests. It occurs to me that this is a solveable problem.
CONTRIBUTING
says:These are good, unambiguous (as far as I can see; when they aren't, contributors can file an issue) rules that don't get in the way, make contributing easier (by taking the guesswork out of writing commit messages and making the log easier to read), and for which there need to be few exceptions. In fact, this lack of friction is one of the reasons I love working on Bonsai - I can really just focus on writing code, and not paperwork.
A current issue I have, though, is remembering how to format commit messages deeper in the tree -
tests/bonsai/dj.mk
in #96, for instance. I don't believe the format is codified yet - or at least not explicitly - but even if it was, I would probably still struggle to remember it, and spend time consulting docs, which isn't as rewarding for me.I'd like to implement a simple
make commit
recipe in the top-levelMakefile
. This would drop the incanter into$VISUAL
with part of the commit message already written - the boring part; the file changed. Adding files to a commit would be unchanged - the usualgit add
. Writing the file prefix of the commit would be a few lines of shell. And for special commits that don't need a file prefix, the committer can just^H
a couple times. This could also make moving to another VCS easier on our muscle memories (which will probably never happen, but you never know).WIP: Automatic git commit messagesto Automatic git commit messagesThere is a lot more of an idiomatic way to do this with git hooks. Do you want me to implement that instead?
That sounds neat, please do!