code: def commit(self, rev=None):
          
          if rev is None:
              return self.head.commit
          else:
              return self.rev_parse(text_type(rev) + "^0")
docs: The Commit object for the specified revision
          :param rev: revision specifier, see git-rev-parse for viable options.
          :return: ``git.Commit``