Re:How to Write a Git Commit Message
by krick on Sunday September 13, 2015 @08:58PM
(#10213275)
So how would you suggest to reword "Refactored invoice parser" for instance? I'm not asking the system to do anything here: in fact, it would be quite unfortunate if it would start doing anything different from what it does already. No, I'm just stating that this part of the system was a mess since its original creation back in Jurassic period and I just cleaned it up.
[ Parent
| on HN ]
Re:How to Write a Git Commit Message
by deadbeef404 on Monday September 14, 2015 @02:26AM
(#10213848)
I would reword "Refactored invoice parser" entirely as that message is about as useful as "changed code".
"parse invoices better" ;)
Re:How to Write a Git Commit Message
by JoshTriplett on Sunday September 13, 2015 @09:48PM
(#10213369)
"Refactor invoice parser"
Have you read the comment I'm answering to? I'll repeat the key sentence for you:
> you should usually be able to reword any "self-action" commits into system action commits
So your suggestion here is completely irrelevant, as "system" doesn't refactor anything.
Re:How to Write a Git Commit Message
by JoshTriplett on Monday September 14, 2015 @02:26AM
(#10213847)
That's not how I've normally seen the advice to write imperative commit messages get interpreted. Quoting Documentation/CodingStyle from the Linux kernel (whose commit messages follow that pattern):
Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour.
Or, if you prefer not to anthropomorphize the codebase (because it hates that), you could also think of it as instructing someone to make the change (and then supplying a patch implementing that instruction).
And a quick search through the Linux kernel git log turns up 1416 messages of the form "subsystem: Refactor ...".