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

Re: How do I get git-format-patch to ignore changes that remove spaces from the end of the line?

From
Junio C Hamano <junkio@cox.net>
Date
Feb 13, 2007, 22:24 UTC
Message-ID
<7vhctpwvam.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<45D234C5.5090005@freescale.com>
Timur Tabi <timur@freescale.com> writes:
Show 12 quoted lines
> After I commit my changes, I use git-format-patch to make a patch.  I
> then get deltas like this:
>
>   * Copyright (C) 1996-2005 Paul Mackerras.
> - *
> + *
>   *  Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
> - *    {engebret|bergner}@us.ibm.com
> + *    {engebret|bergner}@us.ibm.com
>   *
>
> I don't want these deltas in my patch.

You could revert the change to the editor configuration and rely on "git diff" before committing to point out the whitespace breakage that you newly introduced to the file. Then you would be sending out exactly what you changed.

Previous: Timur TabiNext: Timur Tabi
Message 2 of 6 in “How do I get git-format-patch to ignore changes that remove spaces from the end of the line?”
  1. Timur TabiFeb 13, 2007
  2. Junio C HamanoFeb 13, 2007
  3. Timur TabiFeb 13, 2007
  4. teach diff machinery about --ignore-space-at-eolJohannes Schindelin, Feb 14, 2007
  5. Timur TabiFeb 14, 2007
  6. Timur TabiFeb 14, 2007

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.