git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Mitar <mmitar@gmail.com>
Cc: Seth Robertson <in-gitvger@baka.org>, git@vger.kernel.org
Subject: Re: post-fetch, tweak-fetch hook
Date: Mon, 7 May 2012 09:38:10 -0400	[thread overview]
Message-ID: <20120507133810.GA4860@sigill.intra.peff.net> (raw)
In-Reply-To: <CAKLmikNuUB01xKSm9Skd2chXWw3BcWDHT23hqWtNBJPJfYqDKQ@mail.gmail.com>

On Mon, May 07, 2012 at 11:11:30AM +0200, Mitar wrote:

> On Mon, May 7, 2012 at 9:29 AM, Jeff King <peff@peff.net> wrote:
> > I would say the "most git" thing would be to implement "fetch
> > --porcelain", and use its output.
> 
> Yes, that would be also useful. It still makes two different
> interfaces for probably same post-processing (after push and after
> fetch), but still better than nothing, what is current state.

There is nothing to say that the output from "git fetch" could not look
exactly like the post-receive hook's input (in fact, that seems like a
very simple and sensible format). Then you could reuse the code easily.

They would still differ in that one is a hook and one is not, of course.
But at the same time, not being a hook leaves the caller of "git fetch"
with much more flexibility about deciding when to call the hook and when
not (whereas push does not have that luxury, because the code is running
on the remote side).

-Peff

      reply	other threads:[~2012-05-07 13:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-06 20:52 post-fetch, tweak-fetch hook Mitar
2012-05-06 23:10 ` Seth Robertson
2012-05-06 23:54   ` Mitar
2012-05-07  7:29   ` Jeff King
2012-05-07  9:11     ` Mitar
2012-05-07 13:38       ` Jeff King [this message]

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=20120507133810.GA4860@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=in-gitvger@baka.org \
    --cc=mmitar@gmail.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).