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

git-commit/git-applypatch whitespace rules different?

From
MTMichael S. Tsirkin <mst@mellanox.co.il>
Date
Jan 11, 2007, 22:12 UTC
Message-ID
<20070111221211.GM17999@mellanox.co.il>

git-commit/git-applypatch whitespace rules seem to be different. Is this expected?

Example: I take a patch, apply it and commit without warnings about whitespace:

$patch -p1 -i /tmp/ipoib_cm.patc
$git commit drivers/infiniband/ulp/ipoib/
Created commit f83bc11fd3cadb0b3f27d31fbaaa1a5d409e65d9
 8 files changed, 339 insertions(+), 31 deletions(-)
but when try git-applypatch:
$git-applypatch test1 /tmp/ipoib_cm.patch test1
Space in indent is followed by a tab.
/tmp/ipoib_cm.patch:174:                test_bit(IPOIB_FLAG_ADMIN_CM,
						 &priv->flags);
Space in indent is followed by a tab.
/tmp/ipoib_cm.patch:181:                test_bit(IPOIB_FLAG_ADMIN_CM,
						 &priv->flags);
Adds trailing whitespace.
/tmp/ipoib_cm.patch:256:        return;
Space in indent is followed by a tab.
/tmp/ipoib_cm.patch:610:                        ret = 0; /* Connection is going
							    away already. */
Space in indent is followed by a tab.
/tmp/ipoib_cm.patch:1227:               neigh = tx->neigh;
why is not git-commit not warning me? I did not set --no-verify ...
-- 
MST
Next: Michael S. Tsirkin
Message 1 of 2 in “git-commit/git-applypatch whitespace rules different?”
  1. Michael S. TsirkinJan 11, 2007
  2. fix documentation for git-commit --no-verifyMichael S. Tsirkin, Jan 12, 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.