git: split uploadpatch into a script