I didn't mean to commit this.... but honestly you really should take it so stuff like this:
https://github.com/SpigotMC/Spigot/commit/254df64f1b7525d82a4c505b39565c39f47e4d78

Will never happen/be needed.
then ./rebuildPatches will always save the repo in its exact state...