Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Returning commit object instead of hash value
  • Loading branch information
Arthur-Milchior committed Aug 11, 2019
commit 41ca06db26d5669c4966c710a8bafac3cf0a6c3e
4 changes: 2 additions & 2 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,11 +1064,11 @@ def __repr__(self):

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())