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

[PATCH 0/2] Controversial blob munging series

From
Junio C Hamano <junkio@cox.net>
Date
Apr 22, 2007, 06:08 UTC
Message-ID
<11772221041630-git-send-email-junkio@cox.net>

This is on top of 'next' I'll push out after I am done with v1.5.1.2 I am preparing today.

[1/2] Add 'filter' attribute and external filter driver definition. [2/2] Add 'ident' conversion.

I'll park them near the tip of 'pu', but consider they are primarily for interested people to experiment with.

I suspect this might have helped me (and other Asians) a year ago. I did not manage to configure my Emacs to work well with utf-8 encoded Japanese text, and had some difficulties in maintaining documentation for git-lost-found (it has my name spelled in Japanese).

I could have had:
	(in .git/info/attributes)
	Documentation/git-lost-found.txt filter=eucjp-n-utf8
	(in config)
	[filter "eucjp-n-utf8"]
		clean  = nkf -E -w
		smudge = nkf -W -e

so that checked-out copy is after "nkf -W -e" (filter to EUC-JP, treating the input as UTF-8) to allow my Emacs work with EUC-JP. Check-in will be done after "nkf -E -w" (filter to UTF-8, treating the input as EUC-JP), which would keep the "official" version in the repository as UTF-8. The best part of this is that the configurations above are both private to me, and people do not even have to know that I am suffering from the inability to use UTF-8 in my editor.

These days I configured my Emacs to deal with UTF-8 much better than when I added git-lost-found manual page, so I would not need the above hack, though.

I also suspect a "fun but probably not very useful in practice" application would be to have "indent" as the clean filter while leaving "smudge" filter empty.

Next: Junio C Hamano
Message 1 of 10 in “Controversial blob munging series”
  1. 0/2 Controversial blob munging seriesJunio C Hamano, Apr 22, 2007
  2. 1/2 Add 'filter' attribute and external filter driver definition.Junio C Hamano, Apr 22, 2007
  3. 2/2 Add 'ident' conversion.Junio C Hamano, Apr 22, 2007
  4. Johannes SchindelinApr 23, 2007
  5. Julian PhillipsApr 23, 2007
  6. Johannes SchindelinApr 23, 2007
  7. Junio C HamanoApr 23, 2007
  8. Johannes SchindelinApr 23, 2007
  9. Junio C HamanoApr 23, 2007
  10. Johannes SchindelinApr 23, 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.