| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -254,7 +254,7 @@ def _iter_from_process_or_stream(cls, repo, proc_or_stream): | |||
| 254 | 254 | ||
| 255 | 255 | ||
| 256 | 256 | @classmethod | |
| 257 | - def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False): | ||
| 257 | + def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False, author=None, committer=None): | ||
| 258 | 258 | """Commit the given tree, creating a commit object. | |
| 259 | 259 | ||
| 260 | 260 | :param repo: Repo object the commit should be part of | |
@@ -299,8 +299,13 @@ def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False): | |||
| 299 | 299 | cr = repo.config_reader() | |
| 300 | 300 | env = os.environ | |
| 301 | 301 | ||
| 302 | - committer = Actor.committer(cr) | ||
| 303 | - author = Actor.author(cr) | ||
| 302 | + if author is None and committer is None: | ||
| 303 | + committer = Actor.committer(cr) | ||
| 304 | + author = Actor.author(cr) | ||
| 305 | + elif author is None: | ||
| 306 | + author = Actor.author(cr) | ||
| 307 | + elif committer is None: | ||
| 308 | + committer = Actor.committer(cr) | ||
| 304 | 309 | ||
| 305 | 310 | # PARSE THE DATES | |
| 306 | 311 | unix_time = int(time()) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments