don't force checking for dirty submodules#357
Conversation
`opts.ignore_submodules = GIT_SUBMODULE_IGNORE_DIRTY` is equivalent to setting the `git status` flag `--ignore-submodules=dirty`, which takes precedence per-submodule `ignore` settings in .gitmodules. This means that `gitstatus` returns a different result than a default `git status` call with no flags if there are any dirty submodules that are marked `ignore = all` in .gitsubmodules. This is confusing because `git status` and `gitstatusd` will be out of sync and there's no obvious reason why. This should only result in a behavior change for projects with submodules that set the .gitmodules config value `submodule.<name>.ignore` to something besides `none` or `dirty`, but in all cases it will ensure `git status` and `gitstatusd` are in agreement.
|
If you remove that line, are you sure it'll respect the per-submodule Also, I vaguely remember that there was a setting that makes |
|
Good idea, I just tested it out. Removing I don't see any recurse-submodules option for |
I don't know. What I do know is that the line this PR is deleting was put there for a reason and presently we don't know what this reason was. If you could find out, and if this reason is no longer relevant, I'll merge it. |
You added it in version 0.1 (code), but unfortunately I don't see any comment or anything to explain why you put it there in the first place. Based on a Github Code Search, I also don't see any other major projects that are using the |
opts.ignore_submodules = GIT_SUBMODULE_IGNORE_DIRTYis equivalent to setting thegit statusflag--ignore-submodules=dirty, which takes precedence per-submoduleignoresettings in .gitmodules. This means thatgitstatusreturns a different result than a defaultgit statuscall with no flags if there are any dirty submodules that are markedignore = allin .gitsubmodules.This is confusing because
git statusandgitstatusdwill be out of sync and there's no obvious reason why.This should only result in a behavior change for projects with submodules that set the .gitmodules config value
submodule.<name>.ignoreto something besidesnoneordirty, but in all cases it will ensuregit statusandgitstatusdare in agreement.Fixes #356.