Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-scm
Navigation:
Lists: gentoo-scm: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-scm@g.o
From: "Robin H. Johnson" <robbat2@g.o>
Subject: Re: New hooks for git, was: Progress summary, 2009/06/01
Date: Tue, 9 Jun 2009 13:16:58 -0700
On Wed, Jun 10, 2009 at 01:12:47AM +0530, Arun Raghavan wrote:
> On Mon, 2009-06-01 at 16:45 -0700, Robin H. Johnson wrote:
> > - Finish new hooks for git: 
> >   upload-pack.c - get_common_commits:
> >   right before the 'return 0', check for and launch a new hook,
> > passing
> >   the have/want headers via stdin, and use the return code (AND the
> >   stderr) to see if we should halt.
> Could you expand on this? Doesn't sound too complex - if I understand
> this,  'have' is the set of heads of branches that the server has and
> 'want' is the set of branches that the client figures it needs to update
> (simplifying a little from [1]).
- You'll have to replicate something like the run_receive_hook()
  function (replace the body of the second for loop), maybe call it
  run_upload_hook().
- Look at where upload-pack.c returns ACK/NAK presently.
- Add a means to run the hook function there. Be sure to pass stderr
  back!
- See that get_common_commits sends stderr to the client (I think it
  should handle this perfectly already).

> That said, when do we want to terminate the upload?
Basically, I see something like this (I've skipped the length parts of
the mesage, but see section 5.3 in the RFC):
C: want $ID\0...\n
C: ....
C: done\n
S: NAK\n
S: \002Please visit http://.... and use the bundle for the initial
download\n
S: (disconnect)

The client sent no 'have' blocks (either at all, or sufficiently new),
so we tell them to GTFO.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail     : robbat2@g.o
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
Attachment:
pgpgOkWMvtIo3.pgp (PGP signature)
References:
Progress summary, 2009/06/01
-- Robin H. Johnson
New hooks for git, was: Progress summary, 2009/06/01
-- Arun Raghavan
Navigation:
Lists: gentoo-scm: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
New hooks for git, was: Progress summary, 2009/06/01
Next by thread:
Progress summary, 2009/08/27
Previous by date:
New hooks for git, was: Progress summary, 2009/06/01
Next by date:
Status of git testing


Updated Aug 27, 2009

Summary: Archive of the gentoo-scm mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.