title: API to retrieve recent commits
body: <p>I have some project using a git repository with gerrit and gitweb available on the web. I am looking for an API via which I can do an HTTP request to get the commits made in the last 10 seconds. Currently I am using some github API of a mirror of the repo, though the replag there is over a minute, forcing me to do requests for commits from the last 2 mins if I want anything to show up. Do either gitweb or gerrit provide an API I can use? And if not, are there other alternatives that do not require much work?</p>
  
  <p>Solution found:</p>
  
  <p>Using the API described here: <a href="https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html" rel="nofollow">https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html</a></p>
  
  <p>Doing a query using the "age" restriction, which returns commits at least as old as the specified age. This can be revered by negating the condition which is done by prefixing its name with a -. This is further explained here <a href="https://gerrit.googlecode.com/svn-history/r3021/documentation/2.1.4/user-search.html#search_operators" rel="nofollow">https://gerrit.googlecode.com/svn-history/r3021/documentation/2.1.4/user-search.html#search_operators</a></p>
  
  <p>So my query for the first change merged in the last 10 seconds is this:
  <a href="https://gerrit.wikimedia.org/r/changes/?q=status:merged+project:mediawiki/extensions/Wikibase+-age:10s&amp;n=1" rel="nofollow">https://gerrit.wikimedia.org/r/changes/?q=status:merged+project:mediawiki/extensions/Wikibase+-age:10s&amp;n=1</a></p>