feature request for cc-cmd

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

feature request for cc-cmd

Michal Hocko-2
currently I am using --cc-cmd for larger patch series which are of
interest of different parties (e.g. kernel tree wide stuff) and I do not
want to spam all of them by patches which are not of their interest but
I still want them to receive the cover letter because that is useful to
get a context of a change. In order to do that each particular commit
 Cc: email
 {Acked,Reported,Reviewed,...}-by: email
in the patch header and I use the following

$ cat cc-cmd.sh

if [[ $1 == *gitsendemail.msg* || $1 == *cover-letter* ]]; then
        grep '<.*@.*>' -h *.patch | sed 's/^.*: //' | sort | uniq
        grep '<.*@.*>' -h $1 | sed 's/^.*: //' | sort | uniq

git send-email --cc-cmd ./cc-cmd.sh --to lkml patches...

which works reasonably well except I have to git format-patch the whole
series before posting. Quite often I do git send-email commit-range
though. This way is also little bit error prone because I have to make
sure no unrelated patch files are in the same directory. Would it be
possible that the cc script would get a list of all patch files for the
cover email? I have noticed that git send-email from the sha range will
use /tmp/$rand_dir/*.patch so this should be possible I guess. I would
update my script to

grep '<.*@.*>' -h $1 | sed 's/^.*: //' | sort | uniq
if [[ $1 == *gitsendemail.msg* || $1 == *cover-letter* ]]; then
        grep '<.*@.*>' -h $* | sed 's/^.*: //' | sort | uniq

Would something like that make sense or there is an easier way
which I am just not aware of?

Thanks a lot!
Michal Hocko
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html