Re: Recording the current branch on each commit?
From: James Denholm <hidden>
Date: 2016-06-15 23:00:51
Jeremy Morton [off-list ref] wrote:
On 27/04/2014 22:40, James Denholm wrote:quoted
quoted
Also, you don't always have something you can link a commit to in an issue tracker. You may just be implementing a feature that has been agreed upon, independently of any such tracker. In that case,there'squoted
quoted
no bug# to link to.In which case, refer to whatever system you use. If you aren't using a ticketing system, have the line "Relates-to: Water cooler conversation with Bob on July 28th" or whatever the patches relate to. (Arguably, though, the better solution is to use a ticketing system, or anything that allows discussion to be easily referenced.)Well, as I said elsewhere in this discussion, Git should provide that functionality built-in, IMHO. It would be good to be able to set a one-liner in my .gitconfig to tag each commit with a "branch checked into" trailer.
In that case, write something onto your post-commit hook and the functionality would be achieved. A relates-to line doesn't need a change to the structure of git commits.