code: def get_gitdir(self):
          
          if self.gitlookup is None:
              raise tornado.web.HTTPError(500, 'no git lookup configured')
  
          gitdir = self.gitlookup(self.request)
          if gitdir is None:
              raise tornado.web.HTTPError(404, 'unable to find repository')
          logger.debug("Accessing git at: %s", gitdir)
  
          return gitdir
docs: Determine the git repository for this request