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

Git smart http: parsing commit messages in git-receive-pack

From
ATakos tajti <akos.tajti@gmail.com>
Date
May 6, 2017, 12:30 UTC
Message-ID
<7DA6022F-02F0-41AC-ABAB-64565E81481F@gmail.com>
Dear All,
we implemented a java servlet around the git-http-backend. This servlet intercepts the requests sent by the git client when pushing. One thing I want to achieve is parsing the commit messages in the pre push phase (request param service==git-receive-pack) and after checking if the commit messages contain a given string reject/accept the request. The problem is that I couldn't find a way of parsing the commit messages in git-receive-pack (I can do this in the post  push phase but in that case I cannot reject the push because the changes are already on the server). Is there a way of getting the commit messages before they're actually on the server so that I can reject the push?

Thanks in advance, Ákos Tajti

Next: Bryan Turner
Message 1 of 3 in “Git smart http: parsing commit messages in git-receive-pack”
  1. akos tajtiMay 6, 2017
  2. Bryan TurnerMay 6, 2017
  3. Junio C HamanoMay 8, 2017

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.