From: tom fogal Date: Wed, 22 Jul 2009 02:47:30 GMT Subject: Re: format-patch: numbered patches from a patch list? Message-ID: In-Reply-To: Answering my own question. tom fogal 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}" done to 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