diff options
Diffstat (limited to 'git/refs/symbolic.py')
-rw-r--r-- | git/refs/symbolic.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index eb11627d..9a95b7f0 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -356,10 +356,16 @@ class SymbolicReference(object): will be used :return: added RefLogEntry instance""" # NOTE: we use the committer of the currently active commit - this should be - # correct. See https://github.com/gitpython-developers/GitPython/pull/146 - return RefLog.append_entry(self.commit.committer, RefLog.path(self), oldbinsha, + # 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) + message) def log_entry(self, index): """:return: RefLogEntry at the given index |