Patch Set 5: Looks good to me, but someone else must approve

OK, using the 'show patch history' allowed me to set the compare against that and the previous, and then I was able to step through them individually whilst still maintaining the same diff setting. That was quicker than doing the lot again :-)

So, all changes good. I sent a mail to egit-dev "Smart HTTP Git server general observations" on the 9th at 09:27 GMT+1 which suggested that instead of InfoServlet and RefServlet being subclasses of Servlet, we in fact use a separate abstract class hierarchy Gitlet for these things, then have the GitServlet map calls onto that Gitlet for processing. That means we don't accidentally end up with any HTTP stuff in the Gitlet, and also means that in the future we'd be able to add new Gitlets to handle different paths.

The other observation that comes out is that we should be able to define the RegEx that we match against URLs in the Gitlet itself so that the bind operation knows nothing about specific subclasses. The bind would take an instance of the gitlet, and the gitlet would announce what regexs it knows about. For example:

public abstract class Gitlet {
  public abstract String regex();
  public abstract void serve(req, res, body);
}
and then in the repositoryservlet:

public class RepositoryServlet extends HttpServlet {
  public void init() { bind(InfoGitlet.INSTANCE), ... }
  public void doGet() { router.get(path).serve(req,res,true) }
  public void doHead() { router.get(path).serve(req,res,false) }
}