threads / discuss / 43410

Re: How to prepend data when formatting patches ?

Subject: Re: How to prepend data when formatting patches ?

## tl;dr

5 messages between Nov 30, 2006 and Nov 30, 2006.

replies: 4people: 3as markdown or json

Francis Moreau· Nov 30, 2006, 14:16 UTC · lore

How to prepend data when formatting patches ?

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· Nov 30, 2006, 15:39 UTC · re: Francis Moreau · lore
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

Francis Moreau· Nov 30, 2006, 16:16 UTC · re: Johannes Schindelin · lore
On 11/30/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 18 quoted lines
> 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
Catalin Marinas· Nov 30, 2006, 16:00 UTC · re: Francis Moreau · lore
"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· Nov 30, 2006, 16:19 UTC · re: Catalin Marinas · lore
Hi
On 11/30/06, Catalin Marinas <catalin.marinas@arm.com> wrote:
Show 7 quoted lines
> "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

← back to recent threads