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

Bug v1.9.3: Spurious whitespace warnings when using git apply with the --exclude option

From
PRPeyton Randolph <prandolph@apple.com>
Date
Aug 6, 2014, 17:13 UTC
Message-ID
<332C033B-7809-45A9-9F91-CC3A92090B86@apple.com>
Bug v1.9.3: Spurious whitespace warnings when using git apply with the --exclude option
REPRO STEPS:
1. Create a patch PATCH that modifies two files, A and B. Make sure the modifications to file A add whitespace errors and the modifications to file B do not.
2. Apply that patch to a repo using git apply PATCH --exclude A

ACTUAL RESULT: git apply outputs a "warning: n lines add whitespace errors.” where n is the number of lines with whitespace errors in A.

EXPECTED RESULT: No warning about adding whitespace errors because no whitespace errors are added to the tree since A is excluded and B has no whitespace errors.

Next: Junio C Hamano
Message 1 of 6 in “Bug v1.9.3: Spurious whitespace warnings when using git apply with the --exclude option”
  1. Peyton RandolphAug 6, 2014
  2. Junio C HamanoAug 6, 2014
  3. 0/3 Two fixes to "git apply"Junio C Hamano, Aug 6, 2014
  4. 1/3 apply: use the right attribute for paths in non-Git patchesJunio C Hamano, Aug 6, 2014
  5. 2/3 apply: hoist use_patch() helper for path exclusion upJunio C Hamano, Aug 6, 2014
  6. 3/3 apply: omit ws check for excluded pathsJunio C Hamano, Aug 6, 2014

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.