All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Johan Sorensen <johan@johansorensen.com>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	Tom Werner <mojombo@gmail.com>,
	Tom Preston-Werner <tom@mojombo.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] upload-pack: add a trigger for post-upload-pack hook
Date: Thu, 27 Aug 2009 06:33:10 -0700 (PDT)	[thread overview]
Message-ID: <m3ws4pl6x7.fsf@localhost.localdomain> (raw)
In-Reply-To: <9e0f31700908270509o1031a027y1b49efe7ea9a4fd3@mail.gmail.com>

Johan Sorensen <johan@johansorensen.com> writes:
> On Thu, Aug 27, 2009 at 2:47 AM, Junio C Hamano <gitster@pobox.com> wrote:

> > After upload-pack successfully finishes its operation, post-upload-pack
> > hook can be called for logging purposes.
> >
> > The hook is passed various pieces of information, one per line, from its
> > standard input.  Currently the following items can be fed to the hook, but
> > more types of information may be added in the future:
> >
> >    want SHA-1::
> >        40-byte hexadecimal object name the client asked to include in the
> >        resulting pack.  Can occur one or more times in the input.
> >
> >    have SHA-1::
> >        40-byte hexadecimal object name the client asked to exclude from
> >        the resulting pack, claiming to have them already.  Can occur zero
> >        or more times in the input.
> >
> >    time float::
> >        Number of seconds spent for creating the packfile.
> >
> >    size decimal::
> >        Size of the resulting packfile in bytes.
> 
> Neat. And feeding it lines gives more room for future additions.
> 
> I'd like to suggest the following line from the original patch:
> 
>    full-pack integer::
>         1 if the request was considered a full clone, 0 if it was a
> partial update (fetch)
 
If it is all "want" and no "have", it is clone or fetch into empty
repository.  If additionaly "want"s cover all refs, it is a clone.
No need to pass this information: it can be derived.

> Also, on a similar note; in the little git-daemon (a tiny fork+exec
> server in ruby) included with Gitorious there's a geo-ip lookup based
> on the client addr. It would be fun if the client ip could be passed
> along to this hook as well, but that would require passing it along
> all the way from before fetch-pack is invoked as far as I can see..?

Well, we can pass at least `client-ip`...

[please don't quote what is not needed]
-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2009-08-27 13:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18  7:04 [PATCH] upload-pack: add a trigger for post-upload-pack hook Tom Preston-Werner
2009-08-25 17:43 ` Tom Werner
2009-08-25 18:45   ` Jeff King
2009-08-25 23:50     ` Junio C Hamano
2009-08-26  8:44       ` Johannes Schindelin
2009-08-26  9:03         ` Junio C Hamano
2009-08-26 10:06           ` Johannes Schindelin
2009-08-26 14:19             ` Jeff King
2009-08-26 23:39       ` Junio C Hamano
2009-08-27  0:47         ` Junio C Hamano
2009-08-27 12:09           ` Johan Sørensen
2009-08-27 13:33             ` Jakub Narebski [this message]
2009-08-29  6:17               ` Junio C Hamano
2009-08-31 18:50                 ` Tom Werner
2009-08-31 23:36                   ` Junio C Hamano
2009-08-27 22:56           ` Robin H. Johnson

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=m3ws4pl6x7.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johan@johansorensen.com \
    --cc=mojombo@gmail.com \
    --cc=peff@peff.net \
    --cc=tom@mojombo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.