{"thread":{"id":"59250","subject":"manual option --inline --no-attach override required for format.attach","startedAt":"2023-02-15T21:53:18Z","lastAt":"2023-02-17T22:12:15Z","messageCount":4,"participants":["Brian Inglis","Junio C Hamano","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"472165","messageId":"20230215215112.62559-1-Brian.Inglis@Shaw.ca","threadId":"59250","inReplyTo":null,"subject":"manual option --inline --no-attach override required for format.attach","fromName":"Brian Inglis","fromEmail":"brian.inglis@shaw.ca","sentAt":"2023-02-15T21:51:13Z","receivedAt":"2023-02-15T21:53:18Z","isPatch":false,"sender":{"key":"brian.inglis@shaw.ca","avatar":null},"body":"What did you do before the bug happened? (Steps to reproduce your issue)\ngit format-patch --inline ... --to=linux-man@vger.kernel.org\ngit format-patch --no-attach ... --to=linux-man@vger.kernel.org\ngit send-email ... --to=linux-man@vger.kernel.org\n\nWhat did you expect to happen? (Expected behavior)\nlinux-man maintainer would get patches inline not in attachments as expected\n\nWhat happened instead? (Actual behavior)\nlinux-man maintainer got patches in MIME attachments which he could not use\n\nWhat's different between what you expected and what actually happened?\nusing format-patch either --inline or --no-attach would send patches inline\nneed to remember to specify format-patch --inline --no-attach for every patch\nthere is no way to set config format.inline format.attach=no\n\nAnything else you want to add:\ninitially found format.attach set in /etc/gitconfig and no way to override\nwould be great if linux-man maintainer could set repo config format.inline format.attach=no\n\n\n[System Info]\ngit version:\ngit version 2.39.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: CYGWIN_NT-10.0-19044 3.4.6-1.x86_64 2023-02-14 13:23 UTC x86_64\ncompiler info: gnuc: 11.3\nlibc info: newlib 4.3.0\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\n"},{"id":"472170","messageId":"xmqqr0uqwovt.fsf@gitster.g","threadId":"59250","inReplyTo":"20230215215112.62559-1-Brian.Inglis@Shaw.ca","subject":"Re: manual option --inline --no-attach override required for format.attach","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-02-15T22:21:58Z","receivedAt":"2023-02-15T22:22:04Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brian Inglis <Brian.Inglis@Shaw.ca> writes:\n\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> git format-patch --inline ... --to=linux-man@vger.kernel.org\n\nThis is documented to use multipart/mixed attachement with\n\"Content-Disposition: inline\".\n\n> git format-patch --no-attach ... --to=linux-man@vger.kernel.org\n\nThis should be the default, text/plain patch contained inline in the\nmessage.\n\n> git send-email ... --to=linux-man@vger.kernel.org\n\nIt is unclera what ... hides on this command line, but if you sent\noutput from both of the above two format-patch invocations, then the\noutput from the first invocation of format-patch with --inline would\nbe MIME multipart messages, so it is understandable if the recipient\nsees such messages.\n\n"},{"id":"472176","messageId":"Y+2HCa5kqfVZ0Coq@tapette.crustytoothpaste.net","threadId":"59250","inReplyTo":"20230215215112.62559-1-Brian.Inglis@Shaw.ca","subject":"Re: manual option --inline --no-attach override required for format.attachg","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2023-02-16T01:29:45Z","receivedAt":"2023-02-16T01:29:51Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2023-02-15 at 21:51:13, Brian Inglis wrote:\n> Anything else you want to add:\n> initially found format.attach set in /etc/gitconfig and no way to override\n> would be great if linux-man maintainer could set repo config format.inline format.attach=no\n\nI think Junio has responded to the rest of this and is more familiar\nwith it than I am, but we don't allow repository configuration to be\nshipped in the repo.  That's because in general configuration can\ncontain programs or shell commands and thus execute arbitrary code, so\ndoing so would be a security problem.\n\nExperiences with Vim modelines have shown that embedding configuration,\neven when highly restricted, can be the cause of lots of security\nvulnerabilities, and we've seen this with config used by submodules in\nthe past.  For that and many other reasons, including the fact that\nusers may not care what upstream's preferred settings are, it's\nextremely unlikely that we'll add any automatic way to ship\nconfiguration in the repository.\n-- \nbrian m. carlson (he/him or they/them)\nToronto, Ontario, CA\n"},{"id":"472278","messageId":"e6696187-6fda-5b24-e2ba-91d323ffbfc3@Shaw.ca","threadId":"59250","inReplyTo":"xmqqr0uqwovt.fsf@gitster.g","subject":"Re: manual option --inline --no-attach override required for format.attach","fromName":"Brian Inglis","fromEmail":"brian.inglis@shaw.ca","sentAt":"2023-02-17T22:12:10Z","receivedAt":"2023-02-17T22:12:15Z","isPatch":false,"sender":{"key":"brian.inglis@shaw.ca","avatar":null},"body":"On 2023-02-15 15:21, Junio C Hamano wrote:\n> Brian Inglis <Brian.Inglis@Shaw.ca> writes:\n> \n>> What did you do before the bug happened? (Steps to reproduce your issue)\n>> git format-patch --inline ... --to=linux-man@vger.kernel.org\n> \n> This is documented to use multipart/mixed attachement with\n> \"Content-Disposition: inline\".\n> \n>> git format-patch --no-attach ... --to=linux-man@vger.kernel.org\n> \n> This should be the default, text/plain patch contained inline in the\n> message.\n> \n>> git send-email ... --to=linux-man@vger.kernel.org\n> \n> It is unclera what ... hides on this command line, but if you sent\n> output from both of the above two format-patch invocations, then the\n> output from the first invocation of format-patch with --inline would\n> be MIME multipart messages, so it is understandable if the recipient\n> sees such messages.\n\nThanks Junio,\n\nI think I was being confused by a project maintainer insisting on --inline when \nwhat he really wanted was --no-attach to get inline patches for his process, no \nother project previously caring that /etc/gitconfig had format.attach, and my \nnot even being aware that was set until I checked!\nI also found my ISP had added outgoing milter rate limiting, rejecting \neverything after the 5th patch email in a series, adding to our situation!\n\nBut the point stands that there is no way to switch attach off in local or repo \nconfig if it is on in a more global config, other than remembering to manually \nspecify --no-attach on every git format-patch. Suggest allowing attach=no|off|0.\nThis would benefit those contributing from orgs tightly controlled environments \nwhere they may be unable to change global configs.\n\nThere should also be a config item if project maintainers want to see --inline \nattachments, working in the same manner as attach, or as an argument of attach?\n\n-- \nTake care. Thanks, Brian Inglis\t\t\tCalgary, Alberta, Canada\n\nLa perfection est atteinte\t\t\tPerfection is achieved\nnon pas lorsqu'il n'y a plus rien à ajouter\tnot when there is no more to add\nmais lorsqu'il n'y a plus rien à retirer\tbut when there is no more to cut\n\t\t\t-- Antoine de Saint-Exupéry\n"}]}