git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How do I make git-format-patch reject 8-bit encodings?

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 22, 2011, 00:19 UTC
Message-ID
<7vbp24hqez.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4D62E315.7040506@freescale.com>
Timur Tabi <timur@freescale.com> writes:
Show 7 quoted lines
> Is there any way to get git-format-patch to refuse to create a patch that has
> 8-bit characters in it?  That is, if a given commit somehow has an 8-bit
> character (e.g. utf-encoded), then I want git-format-patch to refuse to create a
> patch for that commit.
>
> Also, how can I do the same thing with git-send-email?  That is, if the patch
> requires an 8-bit encoding, how do I get it to refuse to send the patch?

Feels like an X-Y problem, but wouldn't it be an option to let format-patch write into individual files, check these files and reject ones that are not 8-bit clean, and then send the result out via send-email? You should be proofreading the format-patch output to catch and fix typos before hading them to send-email anyway, so the above would be the natural thing to do.

Previous: Timur TabiNext: Tabi Timur-B04825
Message 2 of 5 in “How do I make git-format-patch reject 8-bit encodings?”
  1. Timur TabiFeb 21, 2011
  2. Junio C HamanoFeb 22, 2011
  3. Tabi Timur-B04825Feb 22, 2011
  4. Jeff KingFeb 22, 2011
  5. Timur TabiFeb 22, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.