Without this, if you have hiredis-py in a submodule, when you run 'python setup.py build', it generates an unignored 'version.pyc' which causes the submodule in the parent repo to be marked dirty by git.
Add *.pyc to .gitignore
Thanks for the PR, but I think *.pyc belongs in a global .gitignore because it is something you never want to commit, for any project.
I'm not sure I follow - was the file I edited not the global .gitignore for hiredis-py?
.gitignore rules do not apply to submodules; In my repo I have *.pyc in my .gitignore, but that doesn't apply to the hiredis-py submodule. Thus, when I build hiredis-py, it creates an unignored .pyc, marking the submodule as dirty.
I mean a system-wide .gitignore. Also see #9.
Ok - I guess my reasoning was that not everyone who clones my project will have such a global .gitignore.
A solution for anyone else with this problem (for git >= 1.7.2) is to add:
ignore = untracked
in the section for hiredis-py in their .gitmodules.
You're right. The gain of adding it to .gitignore outweighs the purist argument of this rule belonging in a system-wide ignores file. Reopening the issue and merging the patch. Thanks for bringing it up again ;-)
Thanks for the follow-up as well, didn't know that trick! Very helpful!