code: def unbare_repo(func):
      
  
      @wraps(func)
      def wrapper(self, *args, **kwargs):
          if self.repo.bare:
              raise InvalidGitRepositoryError("Method '%s' cannot operate on bare repositories" % func.__name__)
          # END bare method
          return func(self, *args, **kwargs)
      # END wrapper
      return wrapper
docs: Methods with this decorator raise InvalidGitRepositoryError if they
      encounter a bare repository