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

Re: [PATCH 1/2] War on whitespace: first, a bit of retreat.

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 3, 2007, 02:45 UTC
Message-ID
<7v7il0yrl3.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20071102174552.GE15595@fieldses.org>
"J. Bruce Fields" <bfields@fieldses.org> writes:
Show 6 quoted lines
> The whitespace policy varies based on the project (and in some cases,
> based on the file within that project).  It shouldn't vary from user to
> user or repo to repo.  So the configuration variable mechanism seems a
> poor match.  Would it be possible to use something like gitattributes
> instead?  Then the whitespace policy would be associated with the
> project itself, would automatically be propagated on clone, etc.

The use of gitattributes certainly sounds like a good way to go. A project like git may say "HT indent for C sources, SP only for Python parts".

Having said that, I've added a few tests and merged the result to 'next' already. We can improve it to use attributes instead while on 'next'.

And the git-apply side needs a matching adjustment.
Previous: J. Bruce Fields
Message 12 of 12 in “War on whitespace: first, a bit of retreat.”
  1. 1/2 War on whitespace: first, a bit of retreat.Junio C Hamano, Nov 2, 2007
  2. 2/2 git-diff: complain about >=8 consecutive spaces in initial indentJunio C Hamano, Nov 2, 2007
  3. Josh TriplettNov 13, 2007
  4. Junio C HamanoNov 14, 2007
  5. David SymondsNov 2, 2007
  6. Andreas EricssonNov 2, 2007
  7. David SymondsNov 2, 2007
  8. Jakub NarebskiNov 2, 2007
  9. David SymondsNov 2, 2007
  10. David SymondsNov 2, 2007
  11. J. Bruce FieldsNov 2, 2007
  12. Junio C HamanoNov 3, 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.