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

Re: [PATCH 3/3] Teach "git branch" about --new-workdir

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jul 24, 2007, 23:15 UTC
Message-ID
<20070724231529.GA29156@steel.home>
In-Reply-To
<46A654A6.5070802@trolltech.com>
Marius Storm-Olsen, Tue, Jul 24, 2007 21:36:06 +0200:
Show 6 quoted lines
> IMO Windows user expect files to be DOS style, since all other files
> are.  Yes, most newer tools 'handle' Unix style files, but creating new
> ones will mostly be DOS style. Some will actually wreak havoc on your
> files, and start adding DOS line endings in the middle of your Unix line
> ending file. I've seen it happen. So, dealing with Unix style text files
> on Windows can be a problem for some people.

I have to stay with Windows, but I'd absolute hate having their stupid line-ending by default. As will my project supervisor, and he gets changes from something like 300 developers. You will definitely get their votes against changing the default

Show 6 quoted lines
> > Git is really slowed down tremendously just by the fact that it runs on 
> > Windows.  You should not add to that.
> 
> The auto crlf conversion is not the slow down here, and the time spent
> there is negligible. I use autocrlf on all my repos on Windows, and
> don't notice it. Filestat'ing on the other hand.. :-)
Of course you wont notice it: you're already on Windows.
Show 7 quoted lines
> > IMHO in most cases -- even on Windows -- you do not want to set autocrlf 
> > at all.  Because you do not need to store the file different from the 
> > version you have in the working tree.
> 
> Not true. I believe, especially at the moment, most Git users on Windows
> are mostly developing code in a cross-platform manner, and therefore
> care about this problem.

Yes. They solve it by working fulltime in \n-lineending. Avoiding that stupid Visual Studio and Notepad helps too.

Show 8 quoted lines
> > The only situation where I think it makes sense, is when you have both 
> > Windows and Unix developers, _and_ your Windows tools sometimes produce 
> > CR/LF stupidly.  But then I'd set it to "input".
> 
> That's ok _now_, because most of the Git user group is experienced
> developer that understand the problem. I'm trying to see past that
> state, and prepare Git for more 'common' usage on Windows. They'd expect
> text files on Windows to be handled correctly, without any fuzz.

Just make the windows installer to setup templates for CR/LF depending on checkbox "[ ] I am Windows idiot, standard issue".

> No tweaking of config options to make it work on Windows. No problems
> with sharing repositories with Unix developers. Just work. That's not
> the current state. But it could be.
It is for me. It will not be that with your suggested default.
Show 7 quoted lines
> Ok, I come from the Perforce world, so here how it works there:
> 1) Files are stored with Unix line endings in the repository.
> 2) Conversion is done on Windows (and older Macs) upon checkout, if the
> file is a text file.
> 3) It has binary file detection when you add it to the depot, so if you
> and to add a DOS line ending file to the repo, you have to mark it as a
> binary file manually

You always setup the lineending conversion in perforce. For each and every client. There is no default. I just don't see what to learn from them (if there ever was something to learn from).

> ... And Git would probably be adapted on
> Windows more quickly, which this is all about. :-) IMHO.

It is hardly worth it. Git already has to put up with ugly workarounds just because of the stupidities coming from that windows. It has had seldom any benefit from supporting this !@#$ing awkward platform.

Previous: Marius Storm-OlsenNext: Marius Storm-Olsen
Message 37 of 46 in “Teach "git branch" about --new-workdir”
  1. 3/3 Teach "git branch" about --new-workdirJohannes Schindelin, Jul 22, 2007
  2. Daniel BarkalowJul 22, 2007
  3. Johannes SchindelinJul 22, 2007
  4. Julian PhillipsJul 22, 2007
  5. Johannes SchindelinJul 22, 2007
  6. Julian PhillipsJul 22, 2007
  7. Johannes SchindelinJul 22, 2007
  8. Julian PhillipsJul 22, 2007
  9. Jakub NarebskiJul 22, 2007
  10. Johannes SchindelinJul 22, 2007
  11. Johannes SchindelinJul 22, 2007
  12. Shawn O. PearceJul 23, 2007
  13. Junio C HamanoJul 23, 2007
  14. Shawn O. PearceJul 23, 2007
  15. Shawn O. PearceJul 23, 2007
  16. Johannes SchindelinJul 23, 2007
  17. Johannes SchindelinJul 23, 2007
  18. Marius Storm-OlsenJul 24, 2007
  19. Johannes SchindelinJul 24, 2007
  20. Junio C HamanoJul 24, 2007
  21. Johannes SchindelinJul 24, 2007
  22. Marius Storm-OlsenJul 24, 2007
  23. Julian PhillipsJul 24, 2007
  24. Marius Storm-OlsenJul 24, 2007
  25. Johannes SchindelinJul 24, 2007
  26. Josef WeidendorferJul 24, 2007
  27. Johannes SchindelinJul 24, 2007
  28. Josef WeidendorferJul 24, 2007
  29. Jakub NarebskiJul 25, 2007
  30. Johannes SchindelinJul 24, 2007
  31. Marius Storm-OlsenJul 24, 2007
  32. Marius Storm-OlsenJul 24, 2007
  33. Johannes SchindelinJul 24, 2007
  34. Marius Storm-OlsenJul 24, 2007
  35. Johannes SchindelinJul 24, 2007
  36. Marius Storm-OlsenJul 24, 2007
  37. Alex RiesenJul 24, 2007
  38. Marius Storm-OlsenJul 25, 2007
  39. Johannes SchindelinJul 25, 2007
  40. Steven GrimmJul 25, 2007
  41. Andy ParkinsJul 25, 2007
  42. Marius Storm-OlsenJul 25, 2007
  43. Johannes SchindelinJul 25, 2007
  44. Linus TorvaldsJul 25, 2007
  45. Christian MICHONJul 26, 2007
  46. Julian PhillipsJul 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.