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

Re: Error: "You have some suspicious patch lines"

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 22, 2008, 09:13 UTC
Message-ID
<m33am2wade.fsf@localhost.localdomain>
In-Reply-To
<4885895C.5050108@gmail.com>
Ben Aurel <ben.aurel@gmail.com> writes:
Show 11 quoted lines
> I working on mac os x 10.5.4 (intel) with git version 1.5.5.3 and I
> always get this message for most of my perl scripts and also for
> "Makefile.pre" files:
> 
> ----------- Message ---------------
> * You have some suspicious patch lines:
> *
> * In src/scripts/trunk/3rdparty/file_sanity.pl
> * trailing whitespace (line 52)
> ...
> ------------------------------------------
> The question now is: Is it really necessary to edit the git script
> everytime? Is there a urgent reason why git refuses to commit because
> of "suspicious" lines? Is it really necessary?

.git/hooks/pre-commit is example hook which helps to keep Coding Style, and prevents from accidentally comitting nonresolved file-level merge conflict (file with conflict markers).

If you want to skip running this hook once (or once upon a time), you can use '-n'/'--no-verify' option to "git commit". Or you can turn this example hook off, either by removing execute permission from it, by removing it alltogether (you can still find it in templates, usually at /usr/share/git-core/templates/hooks/pre-commit), or rename it adding for example '.sample' or '.nonactive' suffix.

This hook should not be turned on by default, but if your filesystem is executing bit challenged it could be turned on at repository creation time unintentionally. Newer version of git use '.sample' suffix (for example pre-commit.sample) instead of relying on not always reliable execute bit being unset.

HTH
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Jeff King
Message 3 of 3 in “Error: "You have some suspicious patch lines"”
  1. Ben AurelJul 22, 2008
  2. Jeff KingJul 22, 2008
  3. Jakub NarebskiJul 22, 2008

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.