Skip to content

Commit

Permalink
Use subprocess to remove dependency on GitPython #74
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Peng committed May 18, 2018
1 parent 9975133 commit 32b333c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/sos_notebook/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,12 +899,9 @@ def __init__(self, **kwargs):
_resume_execution = property(lambda self: self._meta['resume_execution'])

def handle_magic_revisions(self, args, unknown_args):
import git
# default
repo = git.Git()
filename = self._meta['notebook_name'] + '.ipynb'
revisions = repo.log(*(unknown_args + ['--date=short', '--pretty=%H!%cN!%cd!%s',
'--', filename])).splitlines()
revisions = subprocess.check_output(['git', 'log'] + unknown_args + ['--date=short', '--pretty=%H!%cN!%cd!%s',
'--', filename]).decode().splitlines()
if not revisions:
return
text = '''
Expand Down

0 comments on commit 32b333c

Please sign in to comment.