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

rebasing, git-am and whitespace cleanup conundrims

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Oct 25, 2006, 22:49 UTC
Message-ID
<46a038f90610251549u46af5ab9gefb56423fb663e96@mail.gmail.com>
Hola!

i'm going through a rebase of a long series of patches (~50) that have quite a bit of trailing whitespace. Once the rebase is done on my repo (resolving all the code level conflicts), I want to re-rebase it on top of the same commit but cleaning up trailing whitespace.

The problem is that upstream has 'some' trailing whitespace. The policy is to reject "new" trailing whitespace and cleanup in stages to avoid big merge conflicts and stuff.

Now, once the early patches are "in" with --whitespace=trim, the following patches don't apply anymore :-/ and I can't just trim whitespace in the whole patch series automatically.

Is there any way to get git-apply to ignore whitespace differences when applying like GNU patch -l?

When -3 is passed, it must be calling the merge utility from merge_file() -- which doesn't do 'ignore-whitespace'. But if it's a straight patch application, it should be possible to do something like that... maybe?

cheers,
Message 1 of 1 in “rebasing, git-am and whitespace cleanup conundrims”
  1. Martin LanghoffOct 25, 2006

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.