# [Query] Override sendemail.tocmd

8 messages from 2017-05-10 to 2017-05-18. Participants: Viresh Kumar, Ævar Arnfjörð Bjarmason.
Thread: https://gitlist.dev/t/45918

## Viresh Kumar, 2017-05-10 07:23

Subject: [Query] Override sendemail.tocmd
Message-ID: <CAKohpok0=0__AcNZAfziTMYVDhGka3o0hzEN6HHZc=YUr7hWYQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAKohpok0%3D0__AcNZAfziTMYVDhGka3o0hzEN6HHZc%3DYUr7hWYQ%40mail.gmail.com

```
Hi,

I have a use case and wanted help from you guys..

I have set the sendemail.tocmd option in my kernel's .git/config
file and that works very well. But sometimes I want to avoid that
(for example sending the patch to someone without the list and
maintainers).

The suppress-cc=all option works quite well to avoid almost
everything (including running --cc-cmd), but it doesn't suppress
--to-cmd.

Are there any specific reasons why it is being done that way?

Currently I need to go edit my .git/config file and remove tocmd
before sending any such patches and it sucks :)

--
viresh

```

## Viresh Kumar, 2017-05-10 07:29

Subject: Re: [Query] Override sendemail.tocmd
Message-ID: <CAKohpokfVbE9=q6Rhpe0wQP9OuxyaN_z6sJaxdozGqqwTpinbA@mail.gmail.com>
URL: https://gitlist.dev/e/CAKohpokfVbE9%3Dq6Rhpe0wQP9OuxyaN_z6sJaxdozGqqwTpinbA%40mail.gmail.com
In-Reply-To: <CAKohpok0=0__AcNZAfziTMYVDhGka3o0hzEN6HHZc=YUr7hWYQ@mail.gmail.com>

```
On 10 May 2017 at 12:53, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Hi,
>
> I have a use case and wanted help from you guys..
>
> I have set the sendemail.tocmd option in my kernel's .git/config
> file and that works very well. But sometimes I want to avoid that
> (for example sending the patch to someone without the list and
> maintainers).
>
> The suppress-cc=all option works quite well to avoid almost
> everything (including running --cc-cmd), but it doesn't suppress
> --to-cmd.
>
> Are there any specific reasons why it is being done that way?
>
> Currently I need to go edit my .git/config file and remove tocmd
> before sending any such patches and it sucks :)

And it would be *really* useful if we can add the "review" (or whatever
it is called) screen with suppress-cc command as well. Currently the mail
goes away directly without giving us a chance to look at the final list of
recipients the mail is going to :)

--
viresh

```

## Ævar Arnfjörð Bjarmason, 2017-05-10 10:18

Subject: Re: [Query] Override sendemail.tocmd
Message-ID: <CACBZZX4pz26SCZBbivDneRX6hRPxpuPHXpOQKnn1zJL6xWj_Eg@mail.gmail.com>
URL: https://gitlist.dev/e/CACBZZX4pz26SCZBbivDneRX6hRPxpuPHXpOQKnn1zJL6xWj_Eg%40mail.gmail.com
In-Reply-To: <CAKohpok0=0__AcNZAfziTMYVDhGka3o0hzEN6HHZc=YUr7hWYQ@mail.gmail.com>

```
On Wed, May 10, 2017 at 9:23 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Hi,
>
> I have a use case and wanted help from you guys..
>
> I have set the sendemail.tocmd option in my kernel's .git/config
> file and that works very well. But sometimes I want to avoid that
> (for example sending the patch to someone without the list and
> maintainers).
>
> The suppress-cc=all option works quite well to avoid almost
> everything (including running --cc-cmd), but it doesn't suppress
> --to-cmd.
>
> Are there any specific reasons why it is being done that way?
>
> Currently I need to go edit my .git/config file and remove tocmd
> before sending any such patches and it sucks :)

Does something like this work:

    git -c sendemail.tocmd=/bin/false send-email ...

?

```

## Viresh Kumar, 2017-05-10 10:34

Subject: Re: [Query] Override sendemail.tocmd
Message-ID: <20170510103400.GD17481@vireshk-i7>
URL: https://gitlist.dev/e/20170510103400.GD17481%40vireshk-i7
In-Reply-To: <CACBZZX4pz26SCZBbivDneRX6hRPxpuPHXpOQKnn1zJL6xWj_Eg@mail.gmail.com>

```
On 10-05-17, 12:18, Ævar Arnfjörð Bjarmason wrote:
> On Wed, May 10, 2017 at 9:23 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > Hi,
> >
> > I have a use case and wanted help from you guys..
> >
> > I have set the sendemail.tocmd option in my kernel's .git/config
> > file and that works very well. But sometimes I want to avoid that
> > (for example sending the patch to someone without the list and
> > maintainers).
> >
> > The suppress-cc=all option works quite well to avoid almost
> > everything (including running --cc-cmd), but it doesn't suppress
> > --to-cmd.
> >
> > Are there any specific reasons why it is being done that way?
> >
> > Currently I need to go edit my .git/config file and remove tocmd
> > before sending any such patches and it sucks :)
> 
> Does something like this work:
> 
>     git -c sendemail.tocmd=/bin/false send-email ...
> 
> ?

That failed. I tried with 2.12 version first and then on the next branch with
version: 2.13.0.303.g4ebf3021692d

$ git -c sendemail.tocmd=/bin/false send-email --to vingu 0001-abc.patch
0001-abc.patch
(mbox) Adding cc: Viresh Kumar <viresh.kumar@linaro.org> from line 'From: Viresh Kumar <viresh.kumar@linaro.org>'
(body) Adding cc: Viresh Kumar <viresh.kumar@linaro.org> from line 'Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>'
(to-cmd) failed to close pipe to '/bin/false' at /usr/libexec/git-core/git-send-email line 1687.

-- 
viresh

```

## Viresh Kumar, 2017-05-10 10:41

Subject: Re: [Query] Override sendemail.tocmd
Message-ID: <CAKohpokJ6zUCUdOCp4LeaCjsmfAPTSr40MV94j2EbpE1tFXnFg@mail.gmail.com>
URL: https://gitlist.dev/e/CAKohpokJ6zUCUdOCp4LeaCjsmfAPTSr40MV94j2EbpE1tFXnFg%40mail.gmail.com
In-Reply-To: <CAKohpokfVbE9=q6Rhpe0wQP9OuxyaN_z6sJaxdozGqqwTpinbA@mail.gmail.com>

```
On 10 May 2017 at 12:59, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 10 May 2017 at 12:53, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> Hi,
>>
>> I have a use case and wanted help from you guys..
>>
>> I have set the sendemail.tocmd option in my kernel's .git/config
>> file and that works very well. But sometimes I want to avoid that
>> (for example sending the patch to someone without the list and
>> maintainers).
>>
>> The suppress-cc=all option works quite well to avoid almost
>> everything (including running --cc-cmd), but it doesn't suppress
>> --to-cmd.
>>
>> Are there any specific reasons why it is being done that way?
>>
>> Currently I need to go edit my .git/config file and remove tocmd
>> before sending any such patches and it sucks :)
>
> And it would be *really* useful if we can add the "review" (or whatever
> it is called) screen with suppress-cc command as well. Currently the mail
> goes away directly without giving us a chance to look at the final list of
> recipients the mail is going to :)

Fixed that with: sendemail.confirm = always

```

## Viresh Kumar, 2017-05-10 10:43

Subject: Re: [Query] Override sendemail.tocmd
Message-ID: <20170510104343.GE17481@vireshk-i7>
URL: https://gitlist.dev/e/20170510104343.GE17481%40vireshk-i7
In-Reply-To: <20170510103400.GD17481@vireshk-i7>

```
On 10-05-17, 16:04, Viresh Kumar wrote:
> On 10-05-17, 12:18, Ævar Arnfjörð Bjarmason wrote:
> > On Wed, May 10, 2017 at 9:23 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > > Hi,
> > >
> > > I have a use case and wanted help from you guys..
> > >
> > > I have set the sendemail.tocmd option in my kernel's .git/config
> > > file and that works very well. But sometimes I want to avoid that
> > > (for example sending the patch to someone without the list and
> > > maintainers).
> > >
> > > The suppress-cc=all option works quite well to avoid almost
> > > everything (including running --cc-cmd), but it doesn't suppress
> > > --to-cmd.
> > >
> > > Are there any specific reasons why it is being done that way?
> > >
> > > Currently I need to go edit my .git/config file and remove tocmd
> > > before sending any such patches and it sucks :)
> > 
> > Does something like this work:
> > 
> >     git -c sendemail.tocmd=/bin/false send-email ...
> > 
> > ?
> 
> That failed. I tried with 2.12 version first and then on the next branch with
> version: 2.13.0.303.g4ebf3021692d
> 
> $ git -c sendemail.tocmd=/bin/false send-email --to vingu 0001-abc.patch
> 0001-abc.patch
> (mbox) Adding cc: Viresh Kumar <viresh.kumar@linaro.org> from line 'From: Viresh Kumar <viresh.kumar@linaro.org>'
> (body) Adding cc: Viresh Kumar <viresh.kumar@linaro.org> from line 'Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>'
> (to-cmd) failed to close pipe to '/bin/false' at /usr/libexec/git-core/git-send-email line 1687.

And even if this worked, I believe that the right solution would be to fix
suppress-cc to include tocmd also. That's the whole purpose of suppress-cc
option.

-- 
viresh

```

## Ævar Arnfjörð Bjarmason, 2017-05-10 12:21

Subject: Re: [Query] Override sendemail.tocmd
Message-ID: <CACBZZX6zVY=Nq9UZxK+ABtvfKF5Wi-QsGV4vRhg=S70x-YS3AQ@mail.gmail.com>
URL: https://gitlist.dev/e/CACBZZX6zVY%3DNq9UZxK%2BABtvfKF5Wi-QsGV4vRhg%3DS70x-YS3AQ%40mail.gmail.com
In-Reply-To: <20170510104343.GE17481@vireshk-i7>

```
On Wed, May 10, 2017 at 12:43 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 10-05-17, 16:04, Viresh Kumar wrote:
>> On 10-05-17, 12:18, Ćvar Arnfjörđ Bjarmason wrote:
>> > On Wed, May 10, 2017 at 9:23 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> > > Hi,
>> > >
>> > > I have a use case and wanted help from you guys..
>> > >
>> > > I have set the sendemail.tocmd option in my kernel's .git/config
>> > > file and that works very well. But sometimes I want to avoid that
>> > > (for example sending the patch to someone without the list and
>> > > maintainers).
>> > >
>> > > The suppress-cc=all option works quite well to avoid almost
>> > > everything (including running --cc-cmd), but it doesn't suppress
>> > > --to-cmd.
>> > >
>> > > Are there any specific reasons why it is being done that way?
>> > >
>> > > Currently I need to go edit my .git/config file and remove tocmd
>> > > before sending any such patches and it sucks :)
>> >
>> > Does something like this work:
>> >
>> >     git -c sendemail.tocmd=/bin/false send-email ...
>> >
>> > ?
>>
>> That failed. I tried with 2.12 version first and then on the next branch with
>> version: 2.13.0.303.g4ebf3021692d
>>
>> $ git -c sendemail.tocmd=/bin/false send-email --to vingu 0001-abc.patch
>> 0001-abc.patch
>> (mbox) Adding cc: Viresh Kumar <viresh.kumar@linaro.org> from line 'From: Viresh Kumar <viresh.kumar@linaro.org>'
>> (body) Adding cc: Viresh Kumar <viresh.kumar@linaro.org> from line 'Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>'
>> (to-cmd) failed to close pipe to '/bin/false' at /usr/libexec/git-core/git-send-email line 1687.
>
> And even if this worked, I believe that the right solution would be to fix
> suppress-cc to include tocmd also. That's the whole purpose of suppress-cc
> option.

Indeed, it looks like either there should be a new option or the
existing option amended to work with tocmd as you suggest. I was just
wondering if there was a way to do this now, even if with some
non-obvious hack.

```

## Viresh Kumar, 2017-05-18 09:40

Subject: Re: [Query] Override sendemail.tocmd
Message-ID: <CAKohpo=eFcf=VqCOvRJvQacUgMycZ1axvjbsNs2GeUGHzq4_Fg@mail.gmail.com>
URL: https://gitlist.dev/e/CAKohpo%3DeFcf%3DVqCOvRJvQacUgMycZ1axvjbsNs2GeUGHzq4_Fg%40mail.gmail.com
In-Reply-To: <CAKohpok0=0__AcNZAfziTMYVDhGka3o0hzEN6HHZc=YUr7hWYQ@mail.gmail.com>

```
On 10 May 2017 at 12:53, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Hi,
>
> I have a use case and wanted help from you guys..
>
> I have set the sendemail.tocmd option in my kernel's .git/config
> file and that works very well. But sometimes I want to avoid that
> (for example sending the patch to someone without the list and
> maintainers).
>
> The suppress-cc=all option works quite well to avoid almost
> everything (including running --cc-cmd), but it doesn't suppress
> --to-cmd.
>
> Are there any specific reasons why it is being done that way?
>
> Currently I need to go edit my .git/config file and remove tocmd
> before sending any such patches and it sucks :)

Ping !!

```
