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

Re: [PATCH] t/.gitattributes: only ignore whitespace errors in test files

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 13, 2008, 10:00 UTC
Message-ID
<7vod65wt6k.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080613060629.GC26768@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> On Fri, Jun 13, 2008 at 12:35:59AM +0200, Lea Wiemann wrote:
>
>> Only ignore whitespace errors in t/tNNNN-*.sh and the t/tNNNN
>> subdirectories.  Other files (like test libraries) should still be
>> checked.
>
> Why?
>
> What is the difference between test-lib.sh and tNNNN-*.sh that makes one
> subject to whitespace checking and the other not?

Eventually we would want to make all of the t/*.sh not exempt from the whitespace rules. Some currently do have trailing whitespaces as part of their embedded test vectors, but there are many that are more carefully written to avoid trailing whitespaces, by marking the EOL explicitly with a non whitespace characters in the source, and running sed to produce the actual vector that is used in the test. That style is vastly preferrable than having actual lines that end with trailing whitespaces, because it makes it much clearer what is being fed to the scripts and what are expected output when reading the source. You do not have to "cat -e" to see what they exactly do.

So I think this is one step in the right direction. I do not want to keep tNNNN-*.sh exemption forever.

Previous: Lea WiemannNext: Jeff King
Message 4 of 19 in “t/.gitattributes: only ignore whitespace errors in test files”
  1. t/.gitattributes: only ignore whitespace errors in test filesLea Wiemann, Jun 12, 2008
  2. Jeff KingJun 13, 2008
  3. t/.gitattributes: only ignore whitespace errors in test filesLea Wiemann, Jun 13, 2008
  4. Junio C HamanoJun 13, 2008
  5. Jeff KingJun 14, 2008
  6. 1/4 fix whitespace violations in test scriptsJeff King, Jun 14, 2008
  7. Jeff KingJun 14, 2008
  8. Junio C HamanoJun 14, 2008
  9. Jeff KingJun 14, 2008
  10. 1/5 fix whitespace violations in test scriptsJeff King, Jun 14, 2008
  11. 2/5 mask necessary whitespace policy violations in test scriptsJeff King, Jun 14, 2008
  12. 3/5 avoid whitespace on empty line in automatic usage messageJeff King, Jun 14, 2008
  13. 4/5 avoid trailing whitespace in zero-change diffstat linesJeff King, Jun 14, 2008
  14. 5/5 enable whitespace checking of test scriptsJeff King, Jun 14, 2008
  15. 2/4 mask necessary whitespace policy violations in test scriptsJeff King, Jun 14, 2008
  16. 3/4 avoid trailing whitespace in zero-change diffstat linesJeff King, Jun 14, 2008
  17. Junio C HamanoJun 14, 2008
  18. Jeff KingJun 14, 2008
  19. 4/4 enable whitespace checking of test scriptsJeff King, Jun 14, 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.