-
Notifications
You must be signed in to change notification settings - Fork 105
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
gitstatus ignores the ignore
field of .gitmodules
#356
Comments
I wouldn't be surprised if this is a weirdness from our superproject setup (we have 115 submodules defined), but these that are being marked dirty don't seem to be any different from those that aren't being marked dirty. They're in detached-HEAD state, and may or may not be detached at a point in history which is the same as the upstream:
|
One of my coworkers just found that |
Might be related: romkatv/powerlevel10k#1608 |
Do you believe this explains something? |
Yes, we're admittedly in a weird situation – our project (fuchsia.googlesource.com/fuchsia) is migrating from a custom multi-Git-repo management system ("jiri") to Git submodules, and during the transition we'll have submodules enabled but let jiri choose what version to check out. During that time there may be some skew between submodules' pinned versions and the versions that jiri checks out, which causes them to be considered dirty. However, I think it's strange that Does that make sense, or is there a strong reason for |
I can confirm that if I change
|
What I haven't figure out with the 9 repos (out of 115) that I'm seeing this with, is what makes them different. All (marked dirty and not) are:
But aside from that, the use of |
Do you have a workaround that you can employ on your end? If so, that would be the best way to go. If not, your next alternative is to send a PR. If it's clean and safe, I'll merge it and do a release. If it requires non-trivial amount of work from me, I'm unlikely to do it. |
Thanks! Here's a fix: #357 I built and tested locally and confirmed that it works. |
Do you have a workaround that you can employ on your end? |
I can't find any workaround other than patching #357 into my local powerlevel10k checkout and building gitstatus manually, which is not too difficult, and probably good enough. However, this does seem like a genuine bug in I won't insist on you merging the PR though, I trust your judgment (and thank you for your work on powerlevel10k, it's fantastic!). |
At this point, given that we have no theory of why the line of code was added in the first place, I would need to go, read the code and run a bunch of tests. I cannot just merge the PR without doing this. The chance that I'll get around to this is low. Perhaps 10% or so that I'll do it in 2022. |
When used with a superproject that specifies submodules with the
ignore
field set toall
,gitstatus
will count it as an 'unstaged change' if the submodule is not at its own HEAD.submodule configuration from
.gitmodules
:running
git status
doesn't show it as having unstaged changes:unless it's run with
--ignore-submodules=<value other than 'all'>
:but the prompt string constructed by
gitstatus
does count it as having unstaged changes:The text was updated successfully, but these errors were encountered: