threads / discuss / 58968

Add git config variable for signoff

Subject: Add git config variable for signoff

## tl;dr

3 messages between Dec 16, 2022 and Dec 19, 2022.

replies: 2people: 2as markdown or json

Prajwal S N· Dec 16, 2022, 19:50 UTC · lore
Hi all,

I noticed that git provides the config variable `gpgsign` to enable GPG signing of commits by default (akin to the `-S` flag). But there isn't a variable yet for signing off commits by default (akin to the `-s` flag). I feel this would be a convenient feature to have, since a large number of projects today require every commit to be signed off for DCO[1]. I am willing to take this up, and would like to know if a patch would be welcomed. Thank you!

Best regards, Prajwal S N

[1]: https://developercertificate.org/
Junio C Hamano· Dec 16, 2022, 23:03 UTC · re: Prajwal S N · lore

Re: Add git config variable for signoff

Prajwal S N <prajwalnadig21@gmail.com> writes:
Show 13 quoted lines
> I noticed that git provides the config variable `gpgsign` to enable
> GPG signing of commits by default (akin to the `-S` flag). But there
> isn't a variable yet for signing off commits by default (akin to the
> `-s` flag). I feel this would be a convenient feature to have, since a
> large number of projects today require every commit to be signed off
> for DCO[1]. I am willing to take this up, and would like to know if a
> patch would be welcomed.
> Thank you!
>
> Best regards,
> Prajwal S N
>
> [1]: https://developercertificate.org/
I think the latest round was the thread leading to this message:
  https://lore.kernel.org/git/xmqqpnfw8gyn.fsf@gitster-ct.c.googlers.com/
There was an earlier round:
  https://lore.kernel.org/git/20161229084701.GA3643@starla/
Prajwal S N· Dec 19, 2022, 17:26 UTC · re: Junio C Hamano · lore

Re: Add git config variable for signoff

Show 7 quoted lines
> I think the latest round was the thread leading to this message:
>
>   https://lore.kernel.org/git/xmqqpnfw8gyn.fsf@gitster-ct.c.googlers.com/
>
> There was an earlier round:
>
>   https://lore.kernel.org/git/20161229084701.GA3643@starla/

I went through these threads as well as the other related ones, and I understand some of the arguments. It definitely makes sense to have this specifically as opt-in, since it is important for developers to be aware that they are adding a DCO to their commits. This is exactly what my patch suggestion proposes - let us not touch the defaults for signing off, but simply provide a `commit.signoff` config flag identical to the existing `format.signoff` flag that works with `git format-patch`. This would mean that only the developers who regularly signoff every commit can add this to their config, taking full responsibility for choosing to do so :)

Cheers, Prajwal S N

← back to recent threads