Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 2021 11:01:01 -0800
From:      Ravi Pokala <rpokala@freebsd.org>
To:        Ed Maste <emaste@FreeBSD.org>, <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org>
Subject:   Re: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template
Message-ID:  <B77D6D8A-7FE7-411E-A947-119421880412@panasas.com>
In-Reply-To: <202102221531.11MFVxQU048362@gitrepo.freebsd.org>
References:  <202102221531.11MFVxQU048362@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message-----
From: <owner-src-committers@freebsd.org> on behalf of Ed Maste <emaste@FreeBSD.org>
Date: 2021-02-22, Monday at 07:31
To: <src-committers@FreeBSD.org>, <dev-commits-src-all@FreeBSD.org>, <dev-commits-src-main@FreeBSD.org>
Subject: git: aa8ae5fe17eb - main - git hooks: add "Fixes" trailer to commit message template

    The branch main has been updated by emaste:

    URL: https://cgit.FreeBSD.org/src/commit/?id=aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3

    commit aa8ae5fe17eb380b0f30f1641f17a0b3d83a68c3
    Author:     Ed Maste <emaste@FreeBSD.org>
    AuthorDate: 2021-02-20 18:49:31 +0000
    Commit:     Ed Maste <emaste@FreeBSD.org>
    CommitDate: 2021-02-22 15:29:56 +0000

        git hooks: add "Fixes" trailer to commit message template

        A number of projects use "Fixes: <hash>" to identify a commit that is
        fixed by a given change.  Adopt that convention.

        Differential Revision:  https://reviews.freebsd.org/D28693
    ---
     tools/tools/git/hooks/prepare-commit-msg | 1 +
     1 file changed, 1 insertion(+)

    diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg
    index 4d1072700af0..761b4443cfd8 100755
    --- a/tools/tools/git/hooks/prepare-commit-msg
    +++ b/tools/tools/git/hooks/prepare-commit-msg
    @@ -48,6 +48,7 @@ $(awk '1;/^#$/{exit}' $1)
     # Tested by:	<If someone else tested the change.>
     # Approved by:	<If you needed approval for this commit.>
     # Obtained from:	<If the change is from a third party.>
    +# Fixes:	<Short hash and title line of commit fixed by this change>

Hi Ed,

To be clear, that's "${HASH} ${TITLE}" ; space-separated, not colon- or tab-separated?

If that's the case, it would be clearer to say that it's the output of `git log --oneline' for the commit in question.

(Interestingly, I can't seem to figure out how to get `git log --oneline' to print *only* the commit in question; I have to pipe through `grep -m1 ${HASH}'.)

Thanks,

Ravi (rpokala@)

     # MFC after:	<N [day[s]|week[s]|month[s]].  Request a reminder email>
     # MFH:		<Ports tree branch name.  Request approval for merge.>
     # Relnotes:	<Set to 'yes' for mention in release notes.>





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B77D6D8A-7FE7-411E-A947-119421880412>