Thread (1 message) 1 message, 1 author, 2016-06-15

Re: format-patch: numbered patches from a patch list?

From: tom fogal <hidden>
Date: 2016-06-15 22:47:05

Answering my own question.

tom fogal [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help