summaryrefslogtreecommitdiff
path: root/git/refs/log.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2014-11-17 10:44:31 +0100
committerSebastian Thiel <byronimo@gmail.com>2014-11-17 10:44:31 +0100
commit9780b7a0f39f66d6e1946a7d109fc49165b81d64 (patch)
tree614a4128ab5629594607ae2235dcb15567f64b85 /git/refs/log.py
parent322db077a693a513e79577a0adf94c97fc2be347 (diff)
parent3a1e0d7117b9e4ea4be3ef4895e8b2b4937ff98a (diff)
downloadgitpython-9780b7a0f39f66d6e1946a7d109fc49165b81d64.tar.gz
Merge branch '0.3' of https://github.com/firm1/GitPython into firm1-0.3
Fixed most pressing issues, more to come in next commit as we introduced a regression here. Conflicts: git/objects/commit.py git/refs/log.py git/refs/symbolic.py
Diffstat (limited to 'git/refs/log.py')
-rw-r--r--git/refs/log.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/git/refs/log.py b/git/refs/log.py
index 7249aec5..3bc42801 100644
--- a/git/refs/log.py
+++ b/git/refs/log.py
@@ -235,7 +235,8 @@ class RefLog(list, Serializable):
"""Append a new log entry to the revlog at filepath.
:param config_reader: configuration reader of the repository - used to obtain
- user information. May be None
+ user information. May also be an Actor instance identifying the committer directly.
+ May also be None
:param filepath: full path to the log file
:param oldbinsha: binary sha of the previous commit
:param newbinsha: binary sha of the current commit
@@ -249,8 +250,9 @@ 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))
-
+ committer = isinstance(config_reader, Actor) and config_reader or Actor.committer(config_reader)
+ entry = RefLogEntry((bin_to_hex(oldbinsha), bin_to_hex(newbinsha), committer, (int(time.time()), time.altzone), message))
+
lf = LockFile(filepath)
lf._obtain_lock_or_raise()