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

Re: git on MacOSX and files with decomposed utf-8 file names

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jan 21, 2008, 22:34 UTC
Message-ID
<alpine.LFD.1.00.0801211407130.2957@woody.linux-foundation.org>
In-Reply-To
<C373E12A-2AC4-4961-833A-7D51584143C9@sb.org>
On Mon, 21 Jan 2008, Kevin Ballard wrote:
> 
> I'm really surprised that, after all of this, you're still horribly
> misunderstanding my argument. I never said it was invisible. NEVER.

You said it was invisible when you treat things "as text". Here's the quote:

	.. when you treat filenames as text, it DOESN'T MATTER if the 
 	string gets normalized ..

Without ever apparently realizing that "as text" is part of the problem in itself. What is "text" to one person is gibberish to another.

In particular, the biggest reason to not normalize is that you don't know it's text or Unicode in the first place. Which is why git doesn't do it.

And no, even with filenames you don't know that they are "text". People encode stuff in them. And people don't always use UTF-8.

Of course, you could ask everybody to create OS X-only programs that know that under OS X, you only have a subset of filenames. If so, you're complaining about the wrong tool. Especially when the whole point of the tool was to be distributed (not to mention coming from an environment that simply doesn't have the same silly limitations OS X has).

So here's a few clues:
 - "as text" isn't "as unicode": it may well be Latin1 or EUC-JP or
   something. Yes, it's still used. Git doesn't care, and very consciously 
   has avoided forcing character sets, even if the *default* (and notice 
   how it's overridable) commit message encoding may be utf-8.
 - In fact, even in unicode, the difference between "identical" and 
   "equivalent" strings exists, and even in the standard, unicode 
   strings are very much defined to be arbitrary codepoint sequences, not 
   normalized.

So even for the very specific case of unicode text, it's simply not true that "it doesn't matter if the string gets normalized". The unicode spec itself talks about cases where even canonical normalization makes a difference.

Search for this quote:
  "Not all processes are required to respect canonical equivalence. For 
   example:
    * A function that collects a set of the General_Category values 
      present in a string will and should produce a different value for 
      <angstrom sign, semicolon> than for <A, combining ring above, greek 
      question mark>, even though they are canonically equivalent.
    * A function that does a binary comparison of strings will also find 
      these two sequences different."

and notice that first case. Even things that are *very*much* aware of Unicode text do actually have cases where canonical equivalence doesn't mean crud.

		Linus
Previous: Kevin BallardNext: Kevin Ballard
Message 131 of 260 in “git on MacOSX and files with decomposed utf-8 file names”
  1. Mark JunkerJan 16, 2008
  2. Johannes SchindelinJan 16, 2008
  3. Kevin BallardJan 16, 2008
  4. Johannes SchindelinJan 16, 2008
  5. Jakub NarebskiJan 16, 2008
  6. Kevin BallardJan 16, 2008
  7. Jakub NarebskiJan 16, 2008
  8. Kevin BallardJan 16, 2008
  9. Johannes SchindelinJan 16, 2008
  10. Kevin BallardJan 16, 2008
  11. Linus TorvaldsJan 16, 2008
  12. Linus TorvaldsJan 16, 2008
  13. Kevin BallardJan 16, 2008
  14. Linus TorvaldsJan 16, 2008
  15. Pedro MeloJan 16, 2008
  16. Linus TorvaldsJan 17, 2008
  17. Pedro MeloJan 17, 2008
  18. David KastrupJan 17, 2008
  19. Pedro MeloJan 17, 2008
  20. Wincent ColaiutaJan 17, 2008
  21. Johannes SchindelinJan 17, 2008
  22. Linus TorvaldsJan 17, 2008
  23. Kevin BallardJan 17, 2008
  24. Johannes SchindelinJan 17, 2008
  25. Pedro MeloJan 17, 2008
  26. Peter KarlssonJan 18, 2008
  27. Jakub NarebskiJan 18, 2008
  28. David KastrupJan 16, 2008
  29. Linus TorvaldsJan 17, 2008
  30. Kevin BallardJan 17, 2008
  31. Linus TorvaldsJan 17, 2008
  32. Johannes SchindelinJan 17, 2008
  33. Pedro MeloJan 17, 2008
  34. Johannes SchindelinJan 17, 2008
  35. Linus TorvaldsJan 17, 2008
  36. Linus TorvaldsJan 17, 2008
  37. Kevin BallardJan 17, 2008
  38. Linus TorvaldsJan 17, 2008
  39. Kevin BallardJan 17, 2008
  40. Martin LanghoffJan 17, 2008
  41. Kevin BallardJan 17, 2008
  42. Geert BoschJan 17, 2008
  43. Mitch TishmackJan 17, 2008
  44. Wincent ColaiutaJan 17, 2008
  45. Kevin BallardJan 17, 2008
  46. Johannes SchindelinJan 17, 2008
  47. Kevin BallardJan 17, 2008
  48. Robin RosenbergJan 18, 2008
  49. Andrew HeybeyJan 17, 2008
  50. Kevin BallardJan 17, 2008
  51. Kyle MoffettJan 19, 2008
  52. Kevin BallardJan 19, 2008
  53. Wincent ColaiutaJan 17, 2008
  54. Linus TorvaldsJan 17, 2008
  55. Mark JunkerJan 17, 2008
  56. Pedro MeloJan 17, 2008
  57. Johannes SchindelinJan 17, 2008
  58. Mark JunkerJan 17, 2008
  59. Pedro MeloJan 17, 2008
  60. Linus TorvaldsJan 17, 2008
  61. Pedro MeloJan 17, 2008
  62. Linus TorvaldsJan 17, 2008
  63. Mark JunkerJan 17, 2008
  64. Pedro MeloJan 17, 2008
  65. Theodore TsoJan 17, 2008
  66. Linus TorvaldsJan 17, 2008
  67. Kevin BallardJan 18, 2008
  68. Linus TorvaldsJan 18, 2008
  69. Robin RosenbergJan 18, 2008
  70. Linus TorvaldsJan 18, 2008
  71. Brian DessentJan 18, 2008
  72. Dmitry PotapovJan 18, 2008
  73. Robin RosenbergJan 18, 2008
  74. Dmitry PotapovJan 18, 2008
  75. Peter KarlssonJan 18, 2008
  76. Jakub NarebskiJan 18, 2008
  77. Peter KarlssonJan 18, 2008
  78. Dmitry PotapovJan 18, 2008
  79. Peter KarlssonJan 18, 2008
  80. Linus TorvaldsJan 18, 2008
  81. Kevin BallardJan 18, 2008
  82. Dmitry PotapovJan 19, 2008
  83. Kevin BallardJan 19, 2008
  84. Dmitry PotapovJan 19, 2008
  85. Linus TorvaldsJan 19, 2008
  86. Mark JunkerJan 19, 2008
  87. Johannes SchindelinJan 19, 2008
  88. Dmitry PotapovJan 20, 2008
  89. Linus TorvaldsJan 20, 2008
  90. Johannes SchindelinJan 20, 2008
  91. Wincent ColaiutaJan 20, 2008
  92. Linus TorvaldsJan 20, 2008
  93. Mike HommeyJan 20, 2008
  94. Linus TorvaldsJan 20, 2008
  95. Mike HommeyJan 20, 2008
  96. Linus TorvaldsJan 20, 2008
  97. Dmitry PotapovJan 20, 2008
  98. Dmitry PotapovJan 20, 2008
  99. Wincent ColaiutaJan 20, 2008
  100. Junio C HamanoJan 18, 2008
  101. Johannes SchindelinJan 18, 2008
  102. Eric W. BiedermanJan 23, 2008
  103. Junio C HamanoJan 23, 2008
  104. Nicolas PitreJan 23, 2008
  105. Junio C HamanoJan 23, 2008
  106. Peter KarlssonJan 21, 2008
  107. Kevin BallardJan 21, 2008
  108. David KastrupJan 21, 2008
  109. Kevin BallardJan 21, 2008
  110. Dmitry PotapovJan 21, 2008
  111. Kevin BallardJan 21, 2008
  112. David KastrupJan 21, 2008
  113. Dmitry PotapovJan 21, 2008
  114. Jeff KingJan 21, 2008
  115. Nicolas PitreJan 21, 2008
  116. Kevin BallardJan 21, 2008
  117. David KastrupJan 21, 2008
  118. David KastrupJan 21, 2008
  119. Linus TorvaldsJan 21, 2008
  120. Kevin BallardJan 21, 2008
  121. Linus TorvaldsJan 21, 2008
  122. Kevin BallardJan 21, 2008
  123. Linus TorvaldsJan 21, 2008
  124. Kevin BallardJan 21, 2008
  125. David KastrupJan 21, 2008
  126. Martin LanghoffJan 21, 2008
  127. Kevin BallardJan 21, 2008
  128. Martin LanghoffJan 21, 2008
  129. Linus TorvaldsJan 21, 2008
  130. Kevin BallardJan 21, 2008
  131. Linus TorvaldsJan 21, 2008
  132. Kevin BallardJan 21, 2008
  133. Martin LanghoffJan 21, 2008
  134. Theodore TsoJan 21, 2008
  135. Kevin BallardJan 21, 2008
  136. Linus TorvaldsJan 21, 2008
  137. Kevin BallardJan 22, 2008
  138. Linus TorvaldsJan 22, 2008
  139. Linus TorvaldsJan 22, 2008
  140. Kevin BallardJan 22, 2008
  141. Linus TorvaldsJan 22, 2008
  142. Kevin BallardJan 22, 2008
  143. Linus TorvaldsJan 22, 2008
  144. Martin LanghoffJan 22, 2008
  145. Kevin BallardJan 22, 2008
  146. Theodore TsoJan 21, 2008
  147. Kevin BallardJan 21, 2008
  148. Theodore TsoJan 21, 2008
  149. Kevin BallardJan 21, 2008
  150. Theodore TsoJan 21, 2008
  151. Kevin BallardJan 21, 2008
  152. Dmitry PotapovJan 21, 2008
  153. Kevin BallardJan 21, 2008
  154. Dmitry PotapovJan 21, 2008
  155. Kevin BallardJan 21, 2008
  156. Dmitry PotapovJan 21, 2008
  157. Mike HommeyJan 21, 2008
  158. Dmitry PotapovJan 21, 2008
  159. Martin LanghoffJan 21, 2008
  160. David KastrupJan 21, 2008
  161. Linus TorvaldsJan 21, 2008
  162. Martin LanghoffJan 21, 2008
  163. Dmitry PotapovJan 21, 2008
  164. Linus TorvaldsJan 21, 2008
  165. Dmitry PotapovJan 17, 2008
  166. JM IbanezJan 17, 2008
  167. Johannes SchindelinJan 17, 2008
  168. Robin RosenbergJan 18, 2008
  169. Linus TorvaldsJan 17, 2008
  170. Dmitry PotapovJan 17, 2008
  171. Dmitry PotapovJan 16, 2008
  172. Eyvind BernhardsenJan 16, 2008
  173. Wincent ColaiutaJan 16, 2008
  174. Miles BaderJan 17, 2008
  175. Jay SoffianJan 17, 2008
  176. Jay SoffianJan 17, 2008
  177. Junio C HamanoJan 17, 2008
  178. Wincent ColaiutaJan 17, 2008
  179. Johannes SchindelinJan 17, 2008
  180. Pedro MeloJan 17, 2008
  181. Wincent ColaiutaJan 17, 2008
  182. Johannes SchindelinJan 17, 2008
  183. Wincent ColaiutaJan 17, 2008
  184. Junio C HamanoJan 17, 2008
  185. Johan HerlandJan 17, 2008
  186. Johannes SchindelinJan 17, 2008
  187. Wincent ColaiutaJan 17, 2008
  188. Linus TorvaldsJan 17, 2008
  189. Theodore TsoJan 21, 2008
  190. Kevin BallardJan 21, 2008
  191. Martin LanghoffJan 21, 2008
  192. Kevin BallardJan 21, 2008
  193. Johannes SchindelinJan 22, 2008
  194. Kevin BallardJan 22, 2008
  195. David KastrupJan 22, 2008
  196. Martin LanghoffJan 22, 2008
  197. Johannes SchindelinJan 22, 2008
  198. Martin LanghoffJan 22, 2008
  199. Johannes SchindelinJan 22, 2008
  200. David KastrupJan 21, 2008
  201. Kevin BallardJan 22, 2008
  202. David KastrupJan 22, 2008
  203. Kevin BallardJan 21, 2008
  204. Martin LanghoffJan 21, 2008
  205. Kevin BallardJan 22, 2008
  206. Theodore TsoJan 23, 2008
  207. Kevin BallardJan 23, 2008
  208. Martin LanghoffJan 23, 2008
  209. Theodore TsoJan 23, 2008
  210. David KastrupJan 23, 2008
  211. Linus TorvaldsJan 23, 2008
  212. Martin LanghoffJan 23, 2008
  213. Kevin BallardJan 23, 2008
  214. Martin LanghoffJan 23, 2008
  215. Theodore TsoJan 23, 2008
  216. Linus TorvaldsJan 23, 2008
  217. Kevin BallardJan 23, 2008
  218. Mike HommeyJan 23, 2008
  219. Kevin BallardJan 23, 2008
  220. Dmitry PotapovJan 23, 2008
  221. Jonathan del StrotherJan 23, 2008
  222. Dmitry PotapovJan 23, 2008
  223. Mike HommeyJan 23, 2008
  224. Dmitry PotapovJan 23, 2008
  225. Mike HommeyJan 23, 2008
  226. Theodore TsoJan 23, 2008
  227. Linus TorvaldsJan 23, 2008
  228. Theodore TsoJan 23, 2008
  229. Kevin BallardJan 23, 2008
  230. Linus TorvaldsJan 23, 2008
  231. On pathnamesJunio C Hamano, Jan 24, 2008
  232. Nicolas PitreJan 24, 2008
  233. Martin LanghoffJan 25, 2008
  234. Junio C HamanoJan 25, 2008
  235. Junio C HamanoJan 25, 2008
  236. Pedro MeloJan 25, 2008
  237. Johannes SchindelinJan 25, 2008
  238. David KastrupJan 25, 2008
  239. Wincent ColaiutaJan 25, 2008
  240. SeanJan 24, 2008
  241. Johannes SchindelinJan 25, 2008
  242. Daniel BarkalowJan 25, 2008
  243. Junio C HamanoJan 25, 2008
  244. Johannes SchindelinJan 25, 2008
  245. Daniel BarkalowJan 25, 2008
  246. Johannes SchindelinJan 25, 2008
  247. Jeff KingJan 25, 2008
  248. Jay SoffianJan 23, 2008
  249. Martin LanghoffJan 23, 2008
  250. Kevin BallardJan 23, 2008
  251. Dmitry PotapovJan 23, 2008
  252. Kevin BallardJan 23, 2008
  253. Kevin BallardJan 24, 2008
  254. Junio C HamanoJan 24, 2008
  255. Martin LanghoffJan 24, 2008
  256. Kevin BallardJan 24, 2008
  257. Steffen ProhaskaJan 24, 2008
  258. Mitch TishmackJan 24, 2008
  259. Mitch TishmackJan 24, 2008
  260. Kevin BallardJan 24, 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.