Re: [PATCH] commit: add commit.signoff config option
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jun 25, 2015, 08:43 UTC
- Message-ID
- <CAP8UFD1kbu4uB1Xaf_jWdQUBzkSJ-Z3_o3NT0Wb6GNyRG=jSLw@mail.gmail.com>
- In-Reply-To
- <1435217558-5866-1-git-send-email-cmarcelo@gmail.com>
On Thu, Jun 25, 2015 at 9:32 AM, Caio Marcelo de Oliveira Filho <cmarcelo@gmail.com> wrote:
> In projects that use Signed-off-by, it's convenient to include that line > in the commit by default. The commit.signoff config option allows to add > that line in all commits automatically.
You can use a commit template.
Or you can use the "commit-msg" hook. For example with commands like:
grep "^Signed-off-by:" "$1" || echo "Signed-off-by: $(git config user.name) <$(git config user.email)>" >>"$1"
If you have more complex needs, there is also "git interpret-trailers" (see the examples in the man page).