{"thread":{"id":"42169","subject":"feature request for cc-cmd","startedAt":"2016-04-28T13:43:46Z","lastAt":"2016-04-28T13:43:46Z","messageCount":1,"participants":["Michal Hocko"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"284804","messageId":"20160428134346.GA31496@dhcp22.suse.cz","threadId":"42169","inReplyTo":null,"subject":"feature request for cc-cmd","fromName":"Michal Hocko","fromEmail":"mhocko@kernel.org","sentAt":"2016-04-28T13:43:46Z","receivedAt":"2016-04-28T13:43:46Z","isPatch":false,"sender":{"key":"mhocko@kernel.org","avatar":null},"body":"Hi,\ncurrently I am using --cc-cmd for larger patch series which are of\ninterest of different parties (e.g. kernel tree wide stuff) and I do not\nwant to spam all of them by patches which are not of their interest but\nI still want them to receive the cover letter because that is useful to\nget a context of a change. In order to do that each particular commit\nhas\n Cc: email\n {Acked,Reported,Reviewed,...}-by: email\nin the patch header and I use the following\n\n$ cat cc-cmd.sh\n!/bin/bash\n\nif [[ $1 == *gitsendemail.msg* || $1 == *cover-letter* ]]; then\n        grep '<.*@.*>' -h *.patch | sed 's/^.*: //' | sort | uniq\nelse\n        grep '<.*@.*>' -h $1 | sed 's/^.*: //' | sort | uniq\nfi\n\ngit send-email --cc-cmd ./cc-cmd.sh --to lkml patches...\n\nwhich works reasonably well except I have to git format-patch the whole\nseries before posting. Quite often I do git send-email commit-range\nthough. This way is also little bit error prone because I have to make\nsure no unrelated patch files are in the same directory. Would it be\npossible that the cc script would get a list of all patch files for the\ncover email? I have noticed that git send-email from the sha range will\nuse /tmp/$rand_dir/*.patch so this should be possible I guess. I would\nupdate my script to\n\n!/bin/bash\ngrep '<.*@.*>' -h $1 | sed 's/^.*: //' | sort | uniq\nif [[ $1 == *gitsendemail.msg* || $1 == *cover-letter* ]]; then\n\tshift\n        grep '<.*@.*>' -h $* | sed 's/^.*: //' | sort | uniq\nfi\n\nWould something like that make sense or there is an easier way\nwhich I am just not aware of?\n\nThanks a lot!\n-- \nMichal Hocko\nSUSE Labs\n"}]}