Git smart http: parsing commit messages in git-receive-pack
- From
- akos 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