{"thread":{"id":"63949","subject":"[BUG] suppress-cc does not support multiple keywords","startedAt":"2025-08-13T00:06:12Z","lastAt":"2025-08-13T15:38:36Z","messageCount":4,"participants":["Timur Tabi","Eric Sunshine","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"524100","messageId":"CAOZdJXWaC2U_YrwuDcA0x3iUeF_uJ658a93cTfdLftEXYRB52Q@mail.gmail.com","threadId":"63949","inReplyTo":null,"subject":"[BUG] suppress-cc does not support multiple keywords","fromName":"Timur Tabi","fromEmail":"timur@kernel.org","sentAt":"2025-08-13T00:05:33Z","receivedAt":"2025-08-13T00:06:12Z","isPatch":false,"sender":{"key":"timur@kernel.org","avatar":null},"body":"I hope this isn't just some user error on my part, but whenever I use\nthe --suppress-cc option, and I specify more than one keyword (e.g.\n--suppress-cc=author,self ), git complains that it doesn't recognize\nthe keyword.  It seems that it treats all of the comma-separated\nkeywords as one big keyword with commas in it.\n\nHere's the git-bugreport:\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\ngit send-email --suppress-cc=author,self ...\n\nWhat did you expect to happen? (Expected behavior)\n\nThe command to succeed, excluding \"author\" and \"self\" from the automatic CC.\n\nWhat happened instead? (Actual behavior)\n\nUnknown --suppress-cc field: 'author,self'\n\nWhat's different between what you expected and what actually happened?\n\nThe --suppress-cc command should accept multiple keywords.\n\nAnything else you want to add:\n\nI was able to work around the problem by specifying --suppress-cc\nmultiple times,\nonce for each keyword.\n\n[System Info]\ngit version 2.50.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nlibcurl: 8.5.0\nzlib: 1.3\nSHA-1: SHA1_DC\nSHA-256: SHA256_BLK\nuname: Linux 6.14.0-27-generic #27~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 2>\ncompiler info: gnuc: 13.3\nlibc info: glibc: 2.39\n$SHELL (typically, interactive shell): /bin/bash\n\n[Enabled Hooks]\n"},{"id":"524112","messageId":"CAPig+cTvCLU3u5y23HSrbxovs8cjcJdOUj0e1G9Rg4F1AP0jAg@mail.gmail.com","threadId":"63949","inReplyTo":"CAOZdJXWaC2U_YrwuDcA0x3iUeF_uJ658a93cTfdLftEXYRB52Q@mail.gmail.com","subject":"Re: [BUG] suppress-cc does not support multiple keywords","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2025-08-13T06:34:45Z","receivedAt":"2025-08-13T06:34:58Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Aug 12, 2025 at 8:06 PM Timur Tabi <timur@kernel.org> wrote:\n> I hope this isn't just some user error on my part, but whenever I use\n> the --suppress-cc option, and I specify more than one keyword (e.g.\n> --suppress-cc=author,self ), git complains that it doesn't recognize\n> the keyword.  It seems that it treats all of the comma-separated\n> keywords as one big keyword with commas in it.\n\nIt's probably a case of user error. As far as I can see, the\ndocumentation[*] does not in any way suggest that --suppress-cc\naccepts a comma-separated list of categories to suppress.\n\n> I was able to work around the problem by specifying --suppress-cc\n> multiple times, once for each keyword.\n\nIndeed, consulting the source code, this behavior appears to be\nintentional. If there is any \"bug\", it's that the documentation does\nstate that you can specify --suppress-cc multiple times (even though\nyou obviously can).\n\n[*]: https://git-scm.com/docs/git-send-email#Documentation/git-send-email.txt---suppress-cccategory\n"},{"id":"524126","messageId":"xmqqfrdvp9zs.fsf@gitster.g","threadId":"63949","inReplyTo":"CAPig+cTvCLU3u5y23HSrbxovs8cjcJdOUj0e1G9Rg4F1AP0jAg@mail.gmail.com","subject":"Re: [BUG] suppress-cc does not support multiple keywords","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-13T14:33:11Z","receivedAt":"2025-08-13T14:33:14Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> ... If there is any \"bug\", it's that the documentation does state\n> that you can specify --suppress-cc multiple times (even though you\n> obviously can).\n>\n> [*]: https://git-scm.com/docs/git-send-email#Documentation/git-send-email.txt---suppress-cccategory\n\n\"does state\"?  or \"does not state\" or \"does state that you cannot\"?\n\nI guess you meant the second one; some other options like --to\nexplicitly say \"multiple times\", but many others, this one among\nthem, does not.\n\nThe existing text\n\n        --suppress-cc=<category>::\n                Specify an additional category of recipients to suppress the\n                auto-cc of:\n\ndoes make it clear that <category> given to a single instance of\nthis option is a single category (\"AN additional category\").\n\n\nPerhaps a minimum fix would be something like this?\n\n\n\n Documentation/git-send-email.adoc | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git c/Documentation/git-send-email.adoc w/Documentation/git-send-email.adoc\nindex 5335502d68..b959e39257 100644\n--- c/Documentation/git-send-email.adoc\n+++ w/Documentation/git-send-email.adoc\n@@ -403,7 +403,9 @@ Automating\n - `all` will suppress all auto cc values.\n --\n +\n-Default is the value of `sendemail.suppressCc` configuration value; if\n+Can be given more than once to suppress multiple categories.\n+Default is the value of `sendemail.suppressCc` configuration\n+variable (which can be given multiple times, one category at a time); if\n that is unspecified, default to `self` if `--suppress-from` is\n specified, as well as `body` if `--no-signed-off-cc` is specified.\n \n"},{"id":"524133","messageId":"CAPig+cTr2e6wQ79VXpADuL6UGVwtHu0qkTfFz7sBdwM_MYk6Ow@mail.gmail.com","threadId":"63949","inReplyTo":"xmqqfrdvp9zs.fsf@gitster.g","subject":"Re: [BUG] suppress-cc does not support multiple keywords","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2025-08-13T15:38:22Z","receivedAt":"2025-08-13T15:38:36Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Aug 13, 2025 at 10:33 AM Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n> > ... If there is any \"bug\", it's that the documentation does state\n> > that you can specify --suppress-cc multiple times (even though you\n> > obviously can).\n>\n> \"does state\"?  or \"does not state\" or \"does state that you cannot\"?\n>\n> I guess you meant the second one\n\nIndeed, I did mean the second one. Don't know how I dropped the word\n\"not\". Sorry for any confusion, and thanks for the correction.\n\n> The existing text\n>         --suppress-cc=<category>::\n>                 Specify an additional category of recipients to suppress the\n>                 auto-cc of:\n> does make it clear that <category> given to a single instance of\n> this option is a single category (\"AN additional category\").\n>\n> Perhaps a minimum fix would be something like this?\n>\n> -Default is the value of `sendemail.suppressCc` configuration value; if\n> +Can be given more than once to suppress multiple categories.\n> +Default is the value of `sendemail.suppressCc` configuration\n> +variable (which can be given multiple times, one category at a time); if\n>  that is unspecified, default to `self` if `--suppress-from` is\n\nYes, I think that would be a welcome change.\n"}]}