{"thread":{"id":"41410","subject":"Issues with cc-cmd","startedAt":"2016-02-15T08:27:46Z","lastAt":"2016-02-15T10:09:43Z","messageCount":3,"participants":["Viresh Kumar","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"278139","messageId":"20160215082746.GH6334@vireshk-i7","threadId":"41410","inReplyTo":null,"subject":"Issues with cc-cmd","fromName":"Viresh Kumar","fromEmail":"viresh.kumar@linaro.org","sentAt":"2016-02-15T08:27:46Z","receivedAt":"2016-02-15T08:27:46Z","isPatch":false,"sender":{"key":"viresh.kumar@linaro.org","avatar":"https://gravatar.com/avatar/938b1abce576d6c6d2734c01fce1c75040618c8fc0d1b7e836277ecd9f35fb19?d=mp&s=160"},"body":"Hi Guys,\n\nI am facing a strange issue with git send-email, with cccmd and was\nlooking for some help.\n\nI am using it with Linux Kernel..\n\nI used get-maintainers today to submit few patches for OPP framework\nand that is defined as below in MAINTAINERS:\n\nOPERATING PERFORMANCE POINTS (OPP)\nM:      Viresh Kumar <vireshk@kernel.org>\nM:      Nishanth Menon <nm@ti.com>\nM:      Stephen Boyd <sboyd@codeaurora.org>\nL:      linux-pm@vger.kernel.org\nS:      Maintained\nT:      git git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git\nF:      drivers/base/power/opp/\nF:      include/linux/pm_opp.h\nF:      Documentation/power/opp.txt\nF:      Documentation/devicetree/bindings/opp/\n\n\nThe parenthesis in the subsystem-name causes the cc list to look like:\n\nCc: linaro-kernel@lists.linaro.org,\nlinux-pm@vger.kernel.org,\nViresh Kumar <viresh.kumar@linaro.org>,\nKrzysztof Kozlowski <k.kozlowski@samsung.com>,\nGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\nLen Brown <len.brown@intel.com>,\nlinux-kernel@vger.kernel.org (open list),\nlinux-pm@vger.kernel.org) (open list:OPERATING PERFORMANCE POINTS\n(OPP),\nNishanth Menon <nm@ti.com>,\nPavel Machek <pavel@ucw.cz>,\nStephen Boyd <sboyd@codeaurora.org>,\nViresh Kumar <vireshk@kernel.org>\n\n\nLook at the second linux-pm entry here, it adds a ')' at the end of\nthe list's address and removes it from the end of the line.\n\nAnd so that becomes an invalid address to git-send-email.\n\nDropping () from the subsystem name fixes it though..\n\nThe output of get_maintainers looks fine, but when its being used by\nputting following into .gitconfig:\n\n[sendemail]\n        cccmd = scripts/get_maintainers\n\n\nit doesn't work well..\n\n-- \nviresh\n"},{"id":"278150","messageId":"xmqqh9haqody.fsf@gitster.mtv.corp.google.com","threadId":"41410","inReplyTo":"20160215082746.GH6334@vireshk-i7","subject":"Re: Issues with cc-cmd","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-02-15T10:06:01Z","receivedAt":"2016-02-15T10:06:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Viresh Kumar <viresh.kumar@linaro.org> writes:\n\n> linux-pm@vger.kernel.org) (open list:OPERATING PERFORMANCE POINTS\n> (OPP),\n\nHmm\n\nhttp://lists.kernelnewbies.org/pipermail/kernelnewbies/2014-July/011343.html\n\ncomes to mind.  It tells you not to blindly automate this process.\n\nI do not offhand know if it was even designed to be directly used\n(and usable) as a cccmd, but anyway, I see this mention in its\n\"Notes:\" section:\n\n  Using \"--roles\" or \"--rolestats\" with git send-email --cc-cmd or any\n      other automated tools that expect only [\"name\"] <email address>\n      may not work because of additional output after <email address>.\n\nI suspect that what you are showing is the \"additional output after\naddress\" the above talks about.\n\nIn any case, this command is maintained as part of the kernel, no?\nI see Joe Perches signed at the beginning of file in 2007; I do not\nknow if he still maintains this script, or somebody else is\nprimarily enhancing it these days (ehh, I probably could use the\nscript on itself, but I am way too lazy late at night), but asking\nhim would be a good starting point, instead of asking here.\n"},{"id":"278152","messageId":"20160215100943.GU6334@vireshk-i7","threadId":"41410","inReplyTo":"xmqqh9haqody.fsf@gitster.mtv.corp.google.com","subject":"Re: Issues with cc-cmd","fromName":"Viresh Kumar","fromEmail":"viresh.kumar@linaro.org","sentAt":"2016-02-15T10:09:43Z","receivedAt":"2016-02-15T10:09:43Z","isPatch":false,"sender":{"key":"viresh.kumar@linaro.org","avatar":"https://gravatar.com/avatar/938b1abce576d6c6d2734c01fce1c75040618c8fc0d1b7e836277ecd9f35fb19?d=mp&s=160"},"body":"On 15-02-16, 02:06, Junio C Hamano wrote:\n> Viresh Kumar <viresh.kumar@linaro.org> writes:\n> \n> > linux-pm@vger.kernel.org) (open list:OPERATING PERFORMANCE POINTS\n> > (OPP),\n> \n> Hmm\n> \n> http://lists.kernelnewbies.org/pipermail/kernelnewbies/2014-July/011343.html\n> \n> comes to mind.  It tells you not to blindly automate this process.\n> \n> I do not offhand know if it was even designed to be directly used\n> (and usable) as a cccmd, but anyway, I see this mention in its\n> \"Notes:\" section:\n> \n>   Using \"--roles\" or \"--rolestats\" with git send-email --cc-cmd or any\n>       other automated tools that expect only [\"name\"] <email address>\n>       may not work because of additional output after <email address>.\n> \n> I suspect that what you are showing is the \"additional output after\n> address\" the above talks about.\n> \n> In any case, this command is maintained as part of the kernel, no?\n> I see Joe Perches signed at the beginning of file in 2007; I do not\n> know if he still maintains this script, or somebody else is\n> primarily enhancing it these days (ehh, I probably could use the\n> script on itself, but I am way too lazy late at night), but asking\n> him would be a good starting point, instead of asking here.\n\nYeah, he told me this sometime back and that solved the issues I was\nfacing, and in fact it looks far better now. Thanks Junio.\n\ngit send-email requires a simple list of names and addresses\nwithout decorations like roles, commit stats or section names.\n\nYou are supposed to use something like:\n\ntocmd = \"scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --pattern-depth=1 --nol\"\ncccmd = \"scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --nom --nor\"\n\n-- \nviresh\n"}]}