I expect this problem is common, but for the life of me I can't seem to find a good solution:
Project Foo requires third-party project Bar's source (which I have no control over)
Project Foo adds Bar as a submodule, because that's the Git solution to this problem
It turns out Bar requires a handful of tiny patches that will never be merged upstream, as they are quite specific to Foo
In my ideal world:
I could "commit" patches to Bar inside Foo. This would make sense since these patches are specific to Foo and not applicable to other users of Bar.
In the real world:
It seems I have to either provide a custom script that the user runs every time in order to patch its copy of Bar (a pain and quite fragile), or I have to host (and consistently keep up to date) a custom copy of every single third-party repository I need (also a pain, seems quite an overkill for tiny patches, and seems weird for changes that are specific to Foo).
What solution am I supposed to use for this problem? I imagine it's quite common, yet I get the feeling Git's "solution" is that patches always be merged upstream, which is quite a non-starter.