I have only tested it on OS X. Note: the PHPBB3-$ticket_id is below the commit message comments, it was the only way to do it without having them removed.
The 1st line has to contain a branchname in [] followed by a space and some text. (E.g. "[feature/foobar] Bla bla")
The 1st line should not be longer than 80 characters to get useful --oneline logs
The 2nd line has to be empty.
Lines 3 till (n-2) should not be longer than 80 characters.
Those lines could be wordwrapped automatically to 80 characters if it is possible to alter the commit message without commiting automatically.
The (n-1)th line has to be empty.
The (n)th line has to contain a ticket name (e.g. "PHPBB3-12345").
Hint: There might be an (n+1)th line if the (n)th line has a \n at the end.
Might be useful, but my sh-fu really isn't that good. Thinking of it now, perhaps the ticket ID can be appended using a commit-msg hook instead of prepare-commit-msg.
EDIT: I've done just that, it now uses a commit-msg hook.
I have tried those now. The install/uninstall scripts work for me, but the new hook for the ticket name (PHPBB3-12345) does not for some reason.
I also noticed that your git-tools branch is on develop, this should go into develop-olympus in my opinion.
bantu wrote:I have tried those now. The install/uninstall scripts work for me, but the new hook for the ticket name (PHPBB3-12345) does not for some reason.
Note that it adds it AFTER you submit your commit message, you need to look at it via `git log -p`.
bantu wrote:I have tried those now. The install/uninstall scripts work for me, but the new hook for the ticket name (PHPBB3-12345) does not for some reason.
I also noticed that your git-tools branch is on develop, this should go into develop-olympus in my opinion.
bantu wrote:I have tried those now. The install/uninstall scripts work for me, but the new hook for the ticket name (PHPBB3-12345) does not for some reason.
Note that it adds it AFTER you submit your commit message, you need to look at it via `git log -p`.
Oh, sorry. I just read up what the "commit-msg" and the "prep-commit-msg" hooks actually are. And I think this should clearly be a "prep-commit-msg" hook. A "commit-msg" hook takes away control from the developer and will only cause confusion.
I updated the hook to append the tracker ID to the commit message pre editing, it makes more sense this way and will confuse people less. I also added a line length check to the commit message hook, I'm not sure how to best approach validating syntax; I could add one giant regex but I'd rather parse over the file and highlight where the error is. See http://github.com/cs278/phpbb3/compare/ ... .git-tools