Re: Recording the current branch on each commit?
- From
James Denholm <nod.helm@gmail.com>
- Date
- Apr 27, 2014, 22:31 UTC
- Message-ID
- <2c8517bf-baf8-46ae-b6f8-88d0a3106a74@email.android.com>
- In-Reply-To
- <535D80EB.2090701@game-point.net>
Jeremy Morton <admin@game-point.net> wrote:
Show 20 quoted lines
>On 27/04/2014 22:40, James Denholm wrote: >>> 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's >>> 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.