# Add git config variable for signoff

3 messages from 2022-12-16 to 2022-12-19. Participants: Prajwal S N, Junio C Hamano.
Thread: https://gitlist.dev/t/58968

## Prajwal S N, 2022-12-16 19:50

Subject: Add git config variable for signoff
Message-ID: <CAC5-4e-hViTA36gg=ui5=kUsSswVe+XhRmBz56H-4PkuhYLrrQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAC5-4e-hViTA36gg%3Dui5%3DkUsSswVe%2BXhRmBz56H-4PkuhYLrrQ%40mail.gmail.com

```
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, 2022-12-16 23:03

Subject: Re: Add git config variable for signoff
Message-ID: <xmqqtu1vkl38.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqtu1vkl38.fsf%40gitster.g
In-Reply-To: <CAC5-4e-hViTA36gg=ui5=kUsSswVe+XhRmBz56H-4PkuhYLrrQ@mail.gmail.com>

```
Prajwal S N <prajwalnadig21@gmail.com> writes:

> 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, 2022-12-19 17:26

Subject: Re: Add git config variable for signoff
Message-ID: <CAC5-4e_TeVon0MAHUk99Kci5XWfeY_mozvGoYk-WGja7A3XCTQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAC5-4e_TeVon0MAHUk99Kci5XWfeY_mozvGoYk-WGja7A3XCTQ%40mail.gmail.com
In-Reply-To: <xmqqtu1vkl38.fsf@gitster.g>

```
> 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

```
