From 28fdf05b1d7827744b7b70eeb1cc66d3afd38c82 Mon Sep 17 00:00:00 2001 From: firm1 Date: Mon, 24 Mar 2014 14:54:23 +0100 Subject: correct log reference --- git/refs/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/refs') diff --git a/git/refs/log.py b/git/refs/log.py index 9a719ec0..560ffd3e 100644 --- a/git/refs/log.py +++ b/git/refs/log.py @@ -247,7 +247,7 @@ class RefLog(list, Serializable): raise ValueError("Shas need to be given in binary format") #END handle sha type assure_directory_exists(filepath, is_file=True) - entry = RefLogEntry((bin_to_hex(oldbinsha), bin_to_hex(newbinsha), Actor.committer(config_reader), (int(time.time()), time.altzone), message)) + entry = RefLogEntry((bin_to_hex(oldbinsha), bin_to_hex(newbinsha), config_reader, (int(time.time()), time.altzone), message)) lf = LockFile(filepath) lf._obtain_lock_or_raise() -- cgit v1.2.3 From 4a7e7a769087b1790a18d6645740b5b670f5086b Mon Sep 17 00:00:00 2001 From: firm1 Date: Mon, 24 Mar 2014 14:56:02 +0100 Subject: Update symbolic.py --- git/refs/symbolic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/refs') diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index ef21950f..5374285e 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -355,7 +355,7 @@ 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, + return RefLog.append_entry(self.commit.committer, RefLog.path(self), oldbinsha, (newbinsha is None and self.commit.binsha) or newbinsha, message) -- cgit v1.2.3 From ba67e4ff74e97c4de5d980715729a773a48cd6bc Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 17 Nov 2014 10:59:39 +0100 Subject: Assure API remains backwards compatible; update API docs --- git/refs/symbolic.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'git/refs') 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 -- cgit v1.2.3