public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Stefan Beller <sbeller@google•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] Introduce a hook to run after formatting patches
Date: Sun, 16 Nov 2014 10:40:42 -0800	[thread overview]
Message-ID: <xmqqzjbryonp.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1416012460-4459-1-git-send-email-sbeller@google.com> (Stefan Beller's message of "Fri, 14 Nov 2014 16:47:40 -0800")

Stefan Beller <sbeller@google•com> writes:

> +post-format-patch
> +~~~~~~~~~~~~
> +
> +This hook is called after format-patch created a patch and it is 
> +invoked with the filename of the patch as the first parameter.

Such an interface would not work well with --stdout mode, would it?

And if this only works with output generated into the files, then

    $ git format-patch $range | xargs -n1 $your_post_processing_script

would do the same without any change to Git, I would imagine.

So I would have to say that I am fairly negative on this change in
the presented form.

An alternative design to implement this as a post-processing filter
to work for both "to individual files" and "to standard output
stream" output filter may be possible, but even in that case I am
not sure if it is worth the churn.

In general I'd look at post-anything hook that works locally with a
great suspicion, so that may partly be where my comment above is
coming from.  I dunno.

  parent reply	other threads:[~2014-11-16 18:40 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 [this message]
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
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=xmqqzjbryonp.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=sbeller@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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