glibc-git-to-patches adds missing patch numbers as needed, but we need some tool to do this directly on the Git repository.
Patch reordering is supported by plain git rebase, so it is not strictly needed here.