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

Re: [PATCH] upload-pack: add a trigger for post-upload-pack hook

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 27, 2009, 13:33 UTC
Message-ID
<m3ws4pl6x7.fsf@localhost.localdomain>
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:
Show 29 quoted lines
> > 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.
Show 5 quoted lines
> 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
Previous: Johan SørensenNext: Junio C Hamano
Message 12 of 16 in “upload-pack: add a trigger for post-upload-pack hook”
  1. upload-pack: add a trigger for post-upload-pack hookTom Preston-Werner, Aug 18, 2009
  2. Tom WernerAug 25, 2009
  3. Jeff KingAug 25, 2009
  4. Junio C HamanoAug 25, 2009
  5. Johannes SchindelinAug 26, 2009
  6. Junio C HamanoAug 26, 2009
  7. Johannes SchindelinAug 26, 2009
  8. Jeff KingAug 26, 2009
  9. Junio C HamanoAug 26, 2009
  10. upload-pack: add a trigger for post-upload-pack hookJunio C Hamano, Aug 27, 2009
  11. Johan SørensenAug 27, 2009
  12. Jakub NarebskiAug 27, 2009
  13. Junio C HamanoAug 29, 2009
  14. Tom WernerAug 31, 2009
  15. Junio C HamanoAug 31, 2009
  16. Robin H. JohnsonAug 27, 2009

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.