{"thread":{"id":"12535","subject":"[ISSUE] git send-email sends wrong patches and non-provided CC (probably bug)","startedAt":"2008-03-06T09:11:19Z","lastAt":"2008-03-08T05:14:51Z","messageCount":4,"participants":["Imran M Yousuf","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"71214","messageId":"7bfdc29a0803060111vc98ef42q96c3ce343fef0859@mail.gmail.com","threadId":"12535","inReplyTo":null,"subject":"[ISSUE] git send-email sends wrong patches and non-provided CC (probably bug)","fromName":"Imran M Yousuf","fromEmail":"imyousuf@gmail.com","sentAt":"2008-03-06T09:11:19Z","receivedAt":"2008-03-06T09:11:19Z","isPatch":false,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"Hi,\n\nFirstly sorry to gitster as he probably has received 10 redundant\nemails from me of my own patch, which I sent for test purpose before\nsending to the mailing list. In this process actually I found 2\nissues:\n\n1. git send-email sends CC to gitster though his email is not mentioned.\n2. I wanted to send patches from a folder containing 3 patches\ngenerated with 'git format-patch -n -o /output/dir/ -M -B origin'\ncommand. When I use git send-email it rather sends 5 email; 3 for\nPATCH 3/3 with same subject but different body. I later generated them\nwithout -n option and sent to the mailing list and that was sent\ncorrectly. Unfortunately gitster has 13 emails of the same content out\nof 10 are outcomes of the bug. I am providing their message id so that\nhe can have a look at them:\nMessage-Id: <1204793490-20160-5-git-send-email-imyousuf@gmail.com>\nMessage-Id: <1204788919-23615-3-git-send-email-imyousuf@gmail.com>\n\nIf someone else wants to have a look at the problem I can also email\nit to him :).\n\n-- \nImran M Yousuf\nEntrepreneur & Software Engineer\nSmart IT Engineering\nDhaka, Bangladesh\nEmail: imran@smartitengineering.com\nMobile: +880-1711402557\n"},{"id":"71215","messageId":"7vskz4cfyq.fsf@gitster.siamese.dyndns.org","threadId":"12535","inReplyTo":"7bfdc29a0803060111vc98ef42q96c3ce343fef0859@mail.gmail.com","subject":"Re: [ISSUE] git send-email sends wrong patches and non-provided CC (probably bug)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-06T10:19:25Z","receivedAt":"2008-03-06T10:19:25Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Imran M Yousuf\" <imyousuf@gmail.com> writes:\n\n> 1. git send-email sends CC to gitster though his email is not mentioned.\n\nCheck your config first.\n"},{"id":"71230","messageId":"7bfdc29a0803060319v1f3ee295k44c1eecb6fbf1ca3@mail.gmail.com","threadId":"12535","inReplyTo":"7vskz4cfyq.fsf@gitster.siamese.dyndns.org","subject":"Re: [ISSUE] git send-email sends wrong patches and non-provided CC (probably bug)","fromName":"Imran M Yousuf","fromEmail":"imyousuf@gmail.com","sentAt":"2008-03-06T11:19:14Z","receivedAt":"2008-03-06T11:19:14Z","isPatch":false,"sender":{"key":"imyousuf@gmail.com","avatar":"https://gravatar.com/avatar/fda3c870262849d03c7b9c4d288842e128d6d80769fa7bc2d22731b7597928be?d=mp&s=160"},"body":"On Thu, Mar 6, 2008 at 4:19 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Imran M Yousuf\" <imyousuf@gmail.com> writes:\n>\n>  > 1. git send-email sends CC to gitster though his email is not mentioned.\n>\n>  Check your config first.\n\nCan someone help me where I can find it in the config? because I\nsurely did not make any change to config of GIT project. I would be\ngrateful for the help.\n\nBest regards,\n\nImran\n\n>\n\n\n\n-- \nImran M Yousuf\nEntrepreneur & Software Engineer\nSmart IT Engineering\nDhaka, Bangladesh\nEmail: imran@smartitengineering.com\nMobile: +880-1711402557\n"},{"id":"71403","messageId":"7vod9pyeyc.fsf@gitster.siamese.dyndns.org","threadId":"12535","inReplyTo":"7bfdc29a0803060319v1f3ee295k44c1eecb6fbf1ca3@mail.gmail.com","subject":"Re: [ISSUE] git send-email sends wrong patches and non-provided CC (probably bug)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-03-08T05:14:51Z","receivedAt":"2008-03-08T05:14:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Imran M Yousuf\" <imyousuf@gmail.com> writes:\n\n> On Thu, Mar 6, 2008 at 4:19 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> \"Imran M Yousuf\" <imyousuf@gmail.com> writes:\n>>\n>>  > 1. git send-email sends CC to gitster though his email is not mentioned.\n>>\n>>  Check your config first.\n>\n> Can someone help me where I can find it in the config? because I\n> surely did not make any change to config of GIT project. I would be\n> grateful for the help.\n\nIn $HOME/.gitconfig and $GIT_DIR/config, sendemail.{to,cccmd,bcc} .\n\nRunning \"git send-email --dry-run $your_command_line_args $files\"\nmay tell you where the recipients list are picked up from.  IIRC, the\ncommand picks up addresses on Signed-off-by: lines too, which needs to be\nexplicitly squelched with --suppress-cc=all and/or friends.\n\nOne irritating pitfall is that --suppress-cc=<cccmd,cc,self,author,sob>\ntakes lower precedence than others; especially, even the command line\n--suppress-cc=all is countermanded by configured sendemail.suppressfrom\nand sendemail.signedoffcc.\n\nEven if we ignore this \"the command line should trump configured values\"\nirritation, I think there is a bug here.\n\n    # If explicit old-style ones are specified, they trump --suppress-cc.\n    $suppress_cc{'self'} = $suppress_from if defined $suppress_from;\n    $suppress_cc{'sob'} = $signed_off_cc if defined $signed_off_cc;\n\n$signed_off_cc asks for cc, so I think the second line should invert its\nlogic.\n\n-- >8 --\nsend-email: --no-signed-off-cc should suppress 'sob' cc\n\nThe logic to countermand suppression of Cc to the signers with a more\nexplicit --signed-off-by option done in 6564828 (git-send-email:\nGeneralize auto-cc recipient mechanism) suffers from a double-negation\nerror.\n\nA --signed-off-cc option, when false, should actively suppress CC: to be\ngenerated out of S-o-b lines, and it should refrain from suppressing when\nit is true.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 29b1105..b3bd922 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -317,7 +317,7 @@ if ($suppress_cc{'all'}) {\n \n # If explicit old-style ones are specified, they trump --suppress-cc.\n $suppress_cc{'self'} = $suppress_from if defined $suppress_from;\n-$suppress_cc{'sob'} = $signed_off_cc if defined $signed_off_cc;\n+$suppress_cc{'sob'} = !$signed_off_cc if defined $signed_off_cc;\n \n # Debugging, print out the suppressions.\n if (0) {\n"}]}