git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Introduce a hook to run after formatting patches

From
Stefan Beller <sbeller@google.com>
Date
Nov 20, 2014, 23:26 UTC
Message-ID
<20141120232628.GA30554@google.com>
In-Reply-To
<CAP8UFD3m9aouYKXfk-vE4AGbTxdyH6=k8ey5n-kF1OLux2Ah0g@mail.gmail.com>
On Tue, Nov 18, 2014 at 07:40:07AM +0100, Christian Couder wrote:
Show 25 quoted lines
> 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,
Previous: Christian CouderNext: Junio C Hamano
Message 8 of 12 in “Introduce a hook to run after formatting patches”
  1. Introduce a hook to run after formatting patchesStefan Beller, Nov 15, 2014
  2. Philip OakleyNov 15, 2014
  3. Junio C HamanoNov 16, 2014
  4. Stefan BellerNov 17, 2014
  5. Junio C HamanoNov 17, 2014
  6. Junio C HamanoNov 17, 2014
  7. Christian CouderNov 18, 2014
  8. Stefan BellerNov 20, 2014
  9. Junio C HamanoNov 20, 2014
  10. Christian CouderNov 21, 2014
  11. Stefan BellerNov 18, 2014
  12. Junio C HamanoNov 18, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.