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

Re: [PATCH 2/2] "diff --check" should affect exit status

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 12, 2007, 09:16 UTC
Message-ID
<7vmysg8e8r.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1197447122-93416-3-git-send-email-win@wincent.com>
Wincent Colaiuta <win@wincent.com> writes:
> "git diff" has a --check option that can be used to check for whitespace
> problems but it only reported by printing warnings to the
> console.

The primary use of this option used to be to see where the breakages are in order to fix them up (IOW, the option was not about seeing if breakage exists or not), but that is much easier with --color output these days.

It is probably a good idea to do this, although I do not care much about it either way. It probably could replace the sample pre-commit hook currently implemented in Perl. As I happen to be fairly familiar with the area, I'll take a look at the patch if/when I find time.

Thanks.
Previous: Wincent ColaiutaNext: Wincent Colaiuta
Message 4 of 5 in “diff whitespace tweaks”
  1. 0/2 diff whitespace tweaksWincent Colaiuta, Dec 12, 2007
  2. 1/2 Use "whitespace" consistentlyWincent Colaiuta, Dec 12, 2007
  3. 2/2 "diff --check" should affect exit statusWincent Colaiuta, Dec 12, 2007
  4. Junio C HamanoDec 12, 2007
  5. Wincent ColaiutaDec 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.