summaryrefslogtreecommitdiff
path: root/git/refs/symbolic.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2014-11-17 11:00:02 +0100
committerSebastian Thiel <byronimo@gmail.com>2014-11-17 11:00:02 +0100
commit9eb902eee03806db5868fc84afb23aa28802e841 (patch)
tree9e557ba5b510b2d68046481e8d185321dd88860b /git/refs/symbolic.py
parent322db077a693a513e79577a0adf94c97fc2be347 (diff)
parentba67e4ff74e97c4de5d980715729a773a48cd6bc (diff)
downloadgitpython-9eb902eee03806db5868fc84afb23aa28802e841.tar.gz
Merge branch 'firm1-0.3' into 0.3
This includes a few fixes to not break backwards compatiblity
Diffstat (limited to 'git/refs/symbolic.py')
-rw-r--r--git/refs/symbolic.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index 9f9eb9f5..9a95b7f0 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -355,8 +355,16 @@ class SymbolicReference(object):
: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,
+ # 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)
def log_entry(self, index):