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

Re: builtin conversion between tabs and spaces

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Oct 15, 2008, 06:26 UTC
Message-ID
<48F58D1C.2040208@viscovery.net>
In-Reply-To
<d4bc1a2a0810141844x76223e76xf04e07ece834fc61@mail.gmail.com>
Stefan Karpinski schrieb:
> This led me to wonder if it wouldn't make sense to have this
> conversion ability built into git.

This wouldn't help your case a lot. It is still at the discretion of each individual repository owner to enable the conversion. (You didn't mean to make this conversion mandatory, did you?)

BTW, you don't need to change git code to achieve this. It's sufficient to install a suitable "clean" filter:

echo "*.c filter=c-code" > .git/info/attributes git config filter.c-code.clean tabs2spaces

where tabs2spaces is your utility that does the conversion.
-- Hannes
Previous: Stefan KarpinskiNext: Stefan Karpinski
Message 10 of 11 in “builtin conversion between tabs and spaces”
  1. Stefan KarpinskiOct 15, 2008
  2. Stefan KarpinskiOct 15, 2008
  3. Alex RiesenOct 15, 2008
  4. Stefan KarpinskiOct 15, 2008
  5. Jonathan del StrotherOct 15, 2008
  6. Stefan KarpinskiOct 15, 2008
  7. Stefan KarpinskiOct 15, 2008
  8. A Large Angry SCMOct 15, 2008
  9. Stefan KarpinskiOct 16, 2008
  10. Johannes SixtOct 15, 2008
  11. Stefan KarpinskiOct 15, 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.