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

git add to ignore whitespaces, some day?

From
Marc-André Lureau <marcandre.lureau@gmail.com>
Date
Feb 27, 2015, 00:09 UTC
Message-ID
<CAJ+F1CL_X7d3RayLmohU3tMi6w5juVFEwCEBUA_Nf-Z53bq+ew@mail.gmail.com>
Hey,

It would be nice if git-add could be told to ignore whitespace changes, wouldn't it?

According to SO, I am not the one to think so: http://stackoverflow.com/questions/3515597/git-add-only-non-whitespace-changes

A change to add--interactive would be as simple as adding the diff -b or -w option like: my @diff = run_cmd_pipe("git", @diff_cmd, "-w", "--", $path);

But I wonder if this should be configured in a diff.ignorews or passed as an argument to git add. Opinions?

-- 
Marc-André Lureau
Next: Jeff King
Message 1 of 2 in “git add to ignore whitespaces, some day?”
  1. Marc-André LureauFeb 27, 2015
  2. Jeff KingMar 4, 2015

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.