code: def merge_base(self, *rev, **kwargs):
          
          if len(rev) < 2:
              raise ValueError("Please specify at least two revs, got only %i" % len(rev))
          # end handle input
  
          res = []
          try:
              lines = self.git.merge_base(*rev, **kwargs).splitlines()
          except GitCommandError as err:
              if err.status == 128:
                  raise
              # end handle invalid rev
              # Status code 1 is returned if there is no merge-base
              # (see https://github.com/git/git/blob/master/builtin/merge-base.c#L16)
              return res
          # end exception handling
  
          for line in lines:
              res.append(self.commit(line))
          # end for each merge-base
  
          return res
docs: Find the closest common ancestor for the given revision (e.g. Commits, Tags, References, etc)
  
          :param rev: At least two revs to find the common ancestor for.
          :param kwargs: Additional arguments to be passed to the repo.git.merge_base() command which does all the work.
          :return: A list of Commit objects. If --all was not specified as kwarg, the list will have at max one Commit,
              or is empty if no common merge base exists.
          :raises ValueError: If not at least two revs are provided