Diff fails on empty repository. · Issue #41 · gitpython-developers/GitPython
Repository navigation
Diff fails on empty repository. #41
New issue
New issue
Closed
Closed
Diff fails on empty repository. #41 Labels
acknowledged
Milestone v0.3.5 - bugfixes
Description
@nemec's profile nemec opened on Jan 8, 2012If you have an empty repository (git init in an empty folder), then add files through GitPython, the repository isn't registered as "dirty" and diffs come back empty. For example:
>>> r = Repo('.')
>>> r.index.add(["README"])
>>> r.is_dirty
False
>>> r.index.diff(None)
[]
The index.entries property shows the newly added file, but there doesn't seem to be a way to turn it into "this file has been added, but not committed".
Metadata
Metadata
Assignees
No one assignedLabels
acknowledged