-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add script to alphabetise submodule list #4054
Conversation
Who, you scared me. For a second, I read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely a good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about doing this the other day after seeing another conflict. ✨ 🙇
BTW, I ran into a few issues when testing the updated
This makes for some pretty unfriendly UX; should the scripts be updated to deal with these hurdles? Even bailing early in |
Yeah, I thought this may have been a problem too. Wanna open an issue so we can track and not forget this? |
Done. 😉 See #4056. |
This PR adds a script to sort the contents of
.gitmodules
each time a new grammar is added.Description
We see this all the time:
This happens because newly-registered submodules are always added at the very bottom of the
.gitmodules
file, meaning that merging one PR usually blocks the next one until the submitter has resolved conflicts manually. This slows everybody down: a user has to fix the conflicts themselves, then @lildude needs to approve the changes later.We can remedy this simply by forcing the submodule list to be alphabetised (case-sensitively). A test has been added to ensure that manually-added modules still get ordered correctly.
As of this writing, there are currently nine PRs sitting open which have conflicting module-lists:
#4030
,#4005
,#3983
,#3869
,#3802
,#3772
,#3764
,#3689
,#3720
.I haven't even bothered to count how many that are closed which have had similar conflicts. 😉
Checklist: