Several committers are unhappy with current state of affairs WRT makepatch target. Particularly, it was hardcoding double underscore (__) as path separator which was making patch file names unnecessary long and particularly ugly.
Another problem was the patch contents itself: timestamps were recorded relative to local timezone, which resulted in gratuitous changes (repo churn). Proposed implementation addresses all these problems.
By default, we propose '-' (dash, minus, hyphen) be to used to replace path separators in patch file names; it can be changed by setting PATCH_PATH_SEPARATOR variable, but we only allow single [-+_] characters.
If a file name happens to contain character which is also a separator replacement character, it will be doubled in the resulting patch name.
To minimize gratuitous patch renames, newly generated patches will be written under existing file names if they use any of the allowed path separators ([-+_]) or legacy double underscore (__).
This is version 10 of the patch. Previous (buggy) versions are available at here under makepatchX.diff names.