Skip to content

Instantly share code, notes, and snippets.

@deostroll
Created July 8, 2012 16:57
Show Gist options
  • Select an option

  • Save deostroll/3071766 to your computer and use it in GitHub Desktop.

Select an option

Save deostroll/3071766 to your computer and use it in GitHub Desktop.
output from python interpreter while trying out GitPython
>>> from git import *
>>> repo = Repo(
... "C:\Users\deostroll\Documents\GitHub\synchost")
>>> repo
<git.Repo "C:\Users\deostroll\Documents\GitHub\synchost\.git">
>>> repo.is_dirty()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\git\repo\base.py", line 502, in is_dirty
len(self.git.diff('HEAD', '--cached', *default_args)):
File "C:\Python27\lib\site-packages\git\cmd.py", line 227, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "C:\Python27\lib\site-packages\git\cmd.py", line 456, in _call_process
return self.execute(call, **_kwargs)
File "C:\Python27\lib\site-packages\git\cmd.py", line 377, in execute
raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git diff HEAD --cached --abbrev=40 --full-index --raw'
returned exit status 1:
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment