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

Re: what are the chances of a 'pre-upload' hook?

From
Jeff King <peff@peff.net>
Date
Nov 28, 2011, 08:01 UTC
Message-ID
<20111128080145.GB16901@sigill.intra.peff.net>
In-Reply-To
<7vzkfgvjdo.fsf@alter.siamese.dyndns.org>
On Sun, Nov 27, 2011 at 10:41:39PM -0800, Junio C Hamano wrote:
Show 10 quoted lines
> >> I actually like the idea of allowing pre-upload-pack hook on git:// and
> >> possibly http:// only....
> >>
> >> One scenario I do not want to see is this. Suppose ...
> >
> > I'm sorry I started this discussion.  I worked around it, though it's
> > a bit kludgy, so maybe time to drop the debate.
> 
> I do not want you to feel sorry, and I do not understand why you feel that
> way.

Agreed. This is a topic that has come up several times before for other users (GitHub and Gentoo come to mind), and which I've given some thought to, which is why I'm writing so many words on the subject.

As for your kludge, I took a peek at gitpod. I actually think intercepting the call to upload-pack is a reasonably sane approach, since you really don't care what the client says, and just want to run before anything else (including ref advertisement) happens. It would be much nicer if git-daemon could take a parameter[1] to an alternate upload-pack path so you didn't have to play PATH games. That would be a simple patch with no security ramifications, I think.

-Peff
[1] I mean a command-line parameter or environment varable. Reading it
    from the repo config _does_ have security implications.
Previous: Junio C HamanoNext: Sitaram Chamarty
Message 18 of 23 in “what are the chances of a 'pre-upload' hook?”
  1. Sitaram ChamartyNov 25, 2011
  2. Martin FickNov 25, 2011
  3. Martin FickNov 25, 2011
  4. Sitaram ChamartyNov 25, 2011
  5. Andreas EricssonNov 25, 2011
  6. Sitaram ChamartyNov 25, 2011
  7. Jeff KingNov 25, 2011
  8. Junio C HamanoNov 26, 2011
  9. Jeff KingNov 26, 2011
  10. Junio C HamanoNov 26, 2011
  11. Jeff KingNov 26, 2011
  12. Junio C HamanoNov 27, 2011
  13. Jeff KingNov 26, 2011
  14. Jeff KingNov 27, 2011
  15. Junio C HamanoNov 27, 2011
  16. Sitaram ChamartyNov 27, 2011
  17. Junio C HamanoNov 28, 2011
  18. Jeff KingNov 28, 2011
  19. Sitaram ChamartyNov 28, 2011
  20. Sitaram ChamartyNov 28, 2011
  21. Jeff KingNov 28, 2011
  22. Jeff KingNov 28, 2011
  23. Jeff KingNov 28, 2011

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.