Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow submodules to be ignored in is_dirty #294

Merged
merged 1 commit into from
Jun 10, 2015

Conversation

Javex
Copy link

@Javex Javex commented Jun 5, 2015

I had a use case with PyGitUp where I did not want submodules to be considered when asking whether a repo is dirty. This change allows that. I am a bit unsure with the "untracked_files" part: I would think that it's not necessary, as I can't imagine an untracked submodule (how would that work? Git would not see it as a submodule), but I included this change anyway. I can of course revert it if you are sure that there can't be a relevant case.

One problem though: I could not run (and thus not write) tests as even the most current tag had test failures for me on Python 2.7.

Please let me know what you think.

There are cases when might not consider a directory dirty when a submodule has
changes. Particular case was git-up stashing changes where submodules are
irrelevant.
Javex added a commit to Javex/PyGitUp that referenced this pull request Jun 5, 2015
Submodule changes cannot be stashed and thus should not be considered when
stashing changes. Requires gitpython-developers/GitPython#294 to be applied
first.
@Byron Byron merged commit 5385cbd into gitpython-developers:master Jun 10, 2015
Byron added a commit that referenced this pull request Jun 10, 2015
* renamed `consider_submodules` to `submodules` to be in line with the
  existing parameters. Nowadays I would prefer the `consider_` prefix,
  but can't change the existing API and thus stick to the current
  naming scheme.
* reduced amount of code in one portion to make it more maintainable.

Related to #294
@Byron
Copy link
Member

Byron commented Jun 10, 2015

Thank you very much !

@Byron Byron added this to the v1.0.2 - Fixes milestone Jun 10, 2015
@Byron
Copy link
Member

Byron commented Jun 10, 2015

You can watch the development stream on youtube.

GitPython #5 [merge PR 294 - improve submodule handling of is_dirty method]

thumb

@Javex Javex deleted the submodule_fix branch June 10, 2015 17:22
@Javex
Copy link
Author

Javex commented Jun 10, 2015

The youtube thing was great :) Nice to hear some comments on the PR. You could of course have asked, even if 5 days have passed, I would have gladly made the changes. Thanks for being so quick in merging the request.

Javex added a commit to Javex/PyGitUp that referenced this pull request Jun 11, 2015
The pull request gitpython-developers/GitPython#294 has been merged but the API
was changed slighty. This commit reflects this change so that it works again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants