git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH] Introduce a hook to run after formatting patches
Date: Thu, 20 Nov 2014 15:26:28 -0800	[thread overview]
Message-ID: <20141120232628.GA30554@google.com> (raw)
In-Reply-To: <CAP8UFD3m9aouYKXfk-vE4AGbTxdyH6=k8ey5n-kF1OLux2Ah0g@mail.gmail.com>

On Tue, Nov 18, 2014 at 07:40:07AM +0100, Christian Couder wrote:
> On Mon, Nov 17, 2014 at 8:20 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > Junio C Hamano <gitster@pobox.com> writes:
> >
> >> (I am not saying that there should be an easy way to drop cruft left
> >> by third-party systems such as "Change-id:" line) ...
> >
> > Heh, that was "should not be", but I guess it was probably obvious.
> >
> > Sorry for the noise.
> 
> I am not sure it is very easy yet but as Change-id: ... line are
> trailers, you can do that with git interpret-trailers.
> 
> For example:
> 
> $ echo -e "\nChange-id: stuff\nOther: thing"  | git -c
> trailer.Change-id.ifexists=replace interpret-trailers --trim-empty
> --trailer Change-id=
> >
> > Other: thing
> 
> The idea is that the above command replaces an existing "Change-id:
> stuff" trailer with an empty "Change-id:" trailer and then removes all
> the empty trailers.
> 

So I have read the man page on the trailers and it seems like the solution
to my problem in removing parts from the commit message.
However I did not find out, if it can be run automatically, whenever
calling format-patch

Maybe all that is missing here is an option

	git config format.enable_trailers 
?

Best,
Stefan

> Best,

  reply	other threads:[~2014-11-20 23:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-15  0:47 [PATCH] Introduce a hook to run after formatting patches Stefan Beller
2014-11-15 10:44 ` Philip Oakley
2014-11-16 18:40 ` Junio C Hamano
2014-11-17 19:01   ` Stefan Beller
2014-11-17 19:06   ` Junio C Hamano
2014-11-17 19:20     ` Junio C Hamano
2014-11-18  6:40       ` Christian Couder
2014-11-20 23:26         ` Stefan Beller [this message]
2014-11-20 23:33           ` Junio C Hamano
2014-11-21  4:31             ` Christian Couder
2014-11-18  2:30     ` Stefan Beller
2014-11-18 17:02       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141120232628.GA30554@google.com \
    --to=sbeller@google.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).