def log_append(self, oldbinsha, message, newbinsha=None): """Append a logentry to the logfile of this ref :param oldbinsha: binary sha this ref used to point to :param message: A message describing the change :param newbinsha: The sha the ref points to now. If None, our current commit sha will be used :return: added RefLogEntry instance""" return RefLog.append_entry(self.repo.config_reader(), RefLog.path(self), oldbinsha, (newbinsha is None and self.commit.binsha) or newbinsha, message)
def log_append(self, oldbinsha, message, newbinsha=None): """Append a logentry to the logfile of this ref :param oldbinsha: binary sha this ref used to point to :param message: A message describing the change :param newbinsha: The sha the ref points to now. If None, our current commit sha will be used :return: added RefLogEntry instance""" # NOTE: we use the committer of the currently active commit - this should be # correct to allow overriding the committer on a per-commit level. # See https://github.com/gitpython-developers/GitPython/pull/146 try: committer_or_reader = self.commit.committer except ValueError: committer_or_reader = self.repo.config_reader() # end handle newly cloned repositories return RefLog.append_entry(committer_or_reader, RefLog.path(self), oldbinsha, (newbinsha is None and self.commit.binsha) or newbinsha, message)