Re: format-patch: numbered patches from a patch list?
- From
tom fogal <tfogal@alumni.unh.edu>
- Date
- Jul 22, 2009, 02:47 UTC
- Message-ID
- <auto-000020035969@sci.utah.edu>
- In-Reply-To
- <auto-000020035874@sci.utah.edu>
Answering my own question.
tom fogal <tfogal@alumni.unh.edu> writes:
> I have a need to generate a numbered sequence of patches from > a sparse sprinkling of patches on a branch. Is there a way to > accomplish this?
Yep. Duh.
Just generate the patches as I did in my my first mail. Then use mtime.sh:
#!/bin/sh
for patch in $@ ; do
commitdate=$(head -n 5 ${patch} | \
grep "^Date" | \
cut -d: -f 2-)
touch -d "${commitdate}" ${patch}
shortfn=$(echo "${patch}" | cut -b 1-30)
echo "Changed ${shortfn} to ${commitdate}"
doneto change the modification time of every patch I care about. Now I can list the files by modification time, achieving exactly what I want.
I really love a full posix environment sometimes.
Sorry for the noise,
-tom