From 4bebfe31c2d9064d4a13de95ad79a4c9bdc3a33a Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sun, 11 Aug 2019 13:45:15 +0200 Subject: Returning commit object instead of hash value --- git/repo/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git/repo') 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()) -- cgit v1.2.3