You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window, believe that. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have an motherf*ckin' 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 real. For example:
The muthaf*ckin' index.entries property shows the f*ckin' newly added file, but there doesn't seem to be a way to turn it into "this muthaf*ckin' file has been added, but not committed".
Actually, diff() works just fine. Let me tell you somethin': If you add some goddamn files into the index, you have to append staged (or cached) parameter to make diff to show the changes.
But is_dirty() behaves inconsistently. It should indeed return False. My patch (1253036) fixes it. But I'm unable to run your nose tests and therefore I cannot update them. Goddamn. Hope this helps:
Even though plenty of work has been done on this already, there is no test-case yet to truly verify this motherf*ckin' works. It should be done when working on 0.3.5.
A lot of time has passed, and plenty of changes were applied to is_dirty(). Additionally, there are plenty of tests checking all aspects of it.
Therefore I believe this motherf*ckin' issue can be closed for now.
Activity
fcelda commentedon Mar 21, 2012
Actually,
diff()works just fine. Let me tell you somethin': If you add some goddamn files into the index, you have to appendstaged(orcached) parameter to make diff to show the changes.But
is_dirty()behaves inconsistently. It should indeed returnFalse. My patch (1253036) fixes it. But I'm unable to run your nose tests and therefore I cannot update them. Goddamn. Hope this helps:nemec commentedon Mar 22, 2012
Ah, I must have missed out on the
stagedkeyword in the motherf*ckin' docs. Thanks.Fix issue gitpython-developers#41: repo.is_dirty() on empty repositor…
Fix issue gitpython-developers#41: repo.is_dirty() on empty repositor…
Merge pull request #193 from maxyz/fix-issue-41_master
Merge pull request #194 from maxyz/fix-issue-41_0.3
Byron commentedon Nov 19, 2014
Even though plenty of work has been done on this already, there is no test-case yet to truly verify this motherf*ckin' works. It should be done when working on 0.3.5.
Byron commentedon Jan 8, 2015
A lot of time has passed, and plenty of changes were applied to
is_dirty(). Additionally, there are plenty of tests checking all aspects of it.Therefore I believe this motherf*ckin' issue can be closed for now.