Open voxik opened 1 year ago
This is my naive implementation:
$ cat rename-patch
#!/usr/bin/bash
mv $1 $(sed -ne '/^Subject: /{
s/^Subject: *\[PATCH[^]]*\] *//;
s/[^a-zA-Z0-9]/-/g;
s/--*/-/g;
s/$/\.patch/;
p;
q;
}' $1)
Packaging SW for Fedora, I sometimes need to apply patch, which I'll download from GH, e.g.:
The problem with this is that I end up with the "791.patch" file, while I'd like have a file with similar name as if I have used the git command:
So I wonder, would you consider to implement some tool, which would renamed the patch in this way?
I have originally tried to convince Git folks to expose such functionality somewhere, but I failed :/ So maybe this project might be interested in this.