diff options
author | Arthur Milchior <Arthur@Milchior.fr> | 2019-08-11 13:45:15 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2019-08-14 17:57:00 +0800 |
commit | 4bebfe31c2d9064d4a13de95ad79a4c9bdc3a33a (patch) | |
tree | 8bf7cb1dbe65a345dd6a746572c466e7d20f3b74 /git | |
parent | 87b5d9c8e54e589d59d6b5391734e98618ffe26e (diff) | |
download | gitpython-4bebfe31c2d9064d4a13de95ad79a4c9bdc3a33a.tar.gz |
Returning commit object instead of hash value
Diffstat (limited to 'git')
-rw-r--r-- | git/repo/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 0a67a5c1..c19fbe29 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -1065,11 +1065,11 @@ class Repo(object): def currently_rebasing_on(self): """ - :return: The hash of the commit which is currently being replayed while rebasing. + :return: The commit which is currently being replayed while rebasing. None if we are not currently rebasing. """ rebase_head_file = osp.join(self.git_dir, "REBASE_HEAD") if not osp.isfile(rebase_head_file): return None - return open(rebase_head_file, "rt").readline().strip() + return self.commit(open(rebase_head_file, "rt").readline().strip()) |