# Re: How to prepend data when formatting patches ?

5 messages from 2006-11-30 to 2006-11-30. Participants: Francis Moreau, Johannes Schindelin, Catalin Marinas.
Thread: https://gitlist.dev/t/43410

## Francis Moreau, 2006-11-30 14:16

Subject: How to prepend data when formatting patches ?
Message-ID: <38b2ab8a0611300616j54a9f8ase9b4f1c305b7c22b@mail.gmail.com>
URL: https://gitlist.dev/e/38b2ab8a0611300616j54a9f8ase9b4f1c305b7c22b%40mail.gmail.com

```
Hi

I'd like to add to all patchs created by "git-format-patch" command
the following line:

        From: xxx.yyy <foo@crazy.com>

I took a look to the command options and git's hooks but I don't find
a solution to this problem.

Is there any tricks to do this ?

thanks
-- 

```

## Johannes Schindelin, 2006-11-30 15:39

Subject: Re: How to prepend data when formatting patches ?
Message-ID: <Pine.LNX.4.63.0611301638430.30004@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0611301638430.30004%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <38b2ab8a0611300616j54a9f8ase9b4f1c305b7c22b@mail.gmail.com>

```
Hi,

On Thu, 30 Nov 2006, Francis Moreau wrote:

> I'd like to add to all patchs created by "git-format-patch" command
> the following line:
> 
>        From: xxx.yyy <foo@crazy.com>

From Documentation/git-format-patch.txt:

-- snip --

CONFIGURATION
-------------
You can specify extra mail header lines to be added to each
message in the repository configuration as follows:

[format]
        headers = "Organization: git-foo\n"

-- snap --

Hth,
Dscho

```

## Catalin Marinas, 2006-11-30 16:00

Subject: Re: How to prepend data when formatting patches ?
Message-ID: <tnx1wnk53ht.fsf@arm.com>
URL: https://gitlist.dev/e/tnx1wnk53ht.fsf%40arm.com
In-Reply-To: <38b2ab8a0611300616j54a9f8ase9b4f1c305b7c22b@mail.gmail.com>

```
"Francis Moreau" <francis.moro@gmail.com> wrote:
> I'd like to add to all patchs created by "git-format-patch" command
> the following line:
>
>         From: xxx.yyy <foo@crazy.com>

In the headers or in the message body? StGIT adds this line
automatically in the message body (and recently only if the sender is
different from the patch author but the templates are flexible and can
be changed).

-- 

```

## Francis Moreau, 2006-11-30 16:16

Subject: Re: How to prepend data when formatting patches ?
Message-ID: <38b2ab8a0611300816r19d883a8qab93c86ff11b7ed7@mail.gmail.com>
URL: https://gitlist.dev/e/38b2ab8a0611300816r19d883a8qab93c86ff11b7ed7%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.63.0611301638430.30004@wbgn013.biozentrum.uni-wuerzburg.de>

```
On 11/30/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Thu, 30 Nov 2006, Francis Moreau wrote:
>
> > I'd like to add to all patchs created by "git-format-patch" command
> > the following line:
> >
> >        From: xxx.yyy <foo@crazy.com>
>
> From Documentation/git-format-patch.txt:
>
> -- snip --
>
> CONFIGURATION
> -------------
> You can specify extra mail header lines to be added to each
> message in the repository configuration as follows:
>

I stupily thought that it couldn't be used to prepend message for the
message body. But since it appends the line at the end of mail header,
it does the right thing for me.

Thanks for your quick answer
-- 

```

## Francis Moreau, 2006-11-30 16:19

Subject: Re: How to prepend data when formatting patches ?
Message-ID: <38b2ab8a0611300819k74da17dcw2e3db376d2cc165b@mail.gmail.com>
URL: https://gitlist.dev/e/38b2ab8a0611300819k74da17dcw2e3db376d2cc165b%40mail.gmail.com
In-Reply-To: <tnx1wnk53ht.fsf@arm.com>

```
Hi

On 11/30/06, Catalin Marinas <catalin.marinas@arm.com> wrote:
> "Francis Moreau" <francis.moro@gmail.com> wrote:
> > I'd like to add to all patchs created by "git-format-patch" command
> > the following line:
> >
> >         From: xxx.yyy <foo@crazy.com>
>
> In the headers or in the message body?

Johannes adviced me to use:

        [format]
                headers = "Organization: git-foo\n"

configuration. And it works both for mail header and message body.

thanks
-- 

```
