# git commit-tree does not honor commit.gpgSign config

4 messages from 2020-09-28 to 2020-09-28. Participants: Evan Grim, Junio C Hamano.
Thread: https://gitlist.dev/t/54318

## Evan Grim, 2020-09-28 16:21

Subject: git commit-tree does not honor commit.gpgSign config
Message-ID: <CABX4Un0NQV1wkx-AKTFs12agLiBLEe+Y_FDHgQwgxUT=wnFDmA@mail.gmail.com>
URL: https://gitlist.dev/e/CABX4Un0NQV1wkx-AKTFs12agLiBLEe%2BY_FDHgQwgxUT%3DwnFDmA%40mail.gmail.com

```
Is it a bug that `git-commit-tree` doesn't honor the `commit.gpgSign`
configuration option?

I'm considering working up a patch to fix this, but want a quick check
from more knowledgeable sources first on what the desired behavior is.

```

## Junio C Hamano, 2020-09-28 18:46

Subject: Re: git commit-tree does not honor commit.gpgSign config
Message-ID: <xmqqd025n3ik.fsf@gitster.c.googlers.com>
URL: https://gitlist.dev/e/xmqqd025n3ik.fsf%40gitster.c.googlers.com
In-Reply-To: <CABX4Un0NQV1wkx-AKTFs12agLiBLEe+Y_FDHgQwgxUT=wnFDmA@mail.gmail.com>

```
Evan Grim <evangrim@gmail.com> writes:

> Is it a bug that `git-commit-tree` doesn't honor the `commit.gpgSign`
> configuration option?

It would be a bug if it did, as a low level plumbing tool to build
scripts around, it would not want its behaviour to be affected by
end-user configuration (rather, scripts that are written using these
plumbing command do want to handle end-user customization their own
ways).

```

## Evan Grim, 2020-09-28 19:42

Subject: Re: git commit-tree does not honor commit.gpgSign config
Message-ID: <CABX4Un3euDWeGr_2DegS3xyoD8VJ23rb9+bj3hBkWS6KZH9FhA@mail.gmail.com>
URL: https://gitlist.dev/e/CABX4Un3euDWeGr_2DegS3xyoD8VJ23rb9%2Bbj3hBkWS6KZH9FhA%40mail.gmail.com
In-Reply-To: <xmqqd025n3ik.fsf@gitster.c.googlers.com>

```
Thank you for that context.  I came across this when I used
`git-subtree` and was surprised the commits it created weren't signed.
Would it be appropriate to look into patching `git-subtree` to honor
the configuration option?

On Mon, Sep 28, 2020 at 12:46 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Evan Grim <evangrim@gmail.com> writes:
>
> > Is it a bug that `git-commit-tree` doesn't honor the `commit.gpgSign`
> > configuration option?
>
> It would be a bug if it did, as a low level plumbing tool to build
> scripts around, it would not want its behaviour to be affected by
> end-user configuration (rather, scripts that are written using these
> plumbing command do want to handle end-user customization their own
> ways).

```

## Junio C Hamano, 2020-09-28 22:37

Subject: Re: git commit-tree does not honor commit.gpgSign config
Message-ID: <xmqqlfgtjzoz.fsf@gitster.c.googlers.com>
URL: https://gitlist.dev/e/xmqqlfgtjzoz.fsf%40gitster.c.googlers.com
In-Reply-To: <CABX4Un3euDWeGr_2DegS3xyoD8VJ23rb9+bj3hBkWS6KZH9FhA@mail.gmail.com>

```
Evan Grim <evangrim@gmail.com> writes:

> On Mon, Sep 28, 2020 at 12:46 PM Junio C Hamano <gitster@pobox.com> wrote:
>>
>> Evan Grim <evangrim@gmail.com> writes:
>>
>> > Is it a bug that `git-commit-tree` doesn't honor the `commit.gpgSign`
>> > configuration option?
>>
>> It would be a bug if it did, as a low level plumbing tool to build
>> scripts around, it would not want its behaviour to be affected by
>> end-user configuration (rather, scripts that are written using these
>> plumbing command do want to handle end-user customization their own
>> ways).
>
> Thank you for that context.  I came across this when I used
> `git-subtree` and was surprised the commits it created weren't signed.
> Would it be appropriate to look into patching `git-subtree` to honor
> the configuration option?

Yes, the script that invokes "commit-tree" is at the right layer to
notice commit.gpgsign and possibly $name_of_the_script.gpgsign
configuration variable(s) and add the -S option, I would think.

I do not know if there are people who are still using, or who is
maintaining, the "subtree" script, though.

Thanks.



```
