login
Header Space

 
 

Re: CRLF problems with Git on Win32

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>, Steffen Prohaska <prohaska@...>
Cc: Git Mailing List <git@...>
Date: Thursday, January 10, 2008 - 3:58 pm

On 8/1/08 18:07, "Junio C Hamano" <gitster@pobox.com> wrote:


I'm not sure that I understand the whole deal about platform default line
endings.  Isn't plain git functionally agnostic about line endings?  You can
check in CRLF text files to git and it doesn't care.  You can diff, show etc
just fine.  I haven't yet found anything that breaks with CRLF files.  In
this sense plain git is already Windows ready.  Maybe I'm missing something?

Doesn't the problem only come if you try to diff a CRLF file with a new
version that has LF only line endings?  Then right now you have to use
something like:

    git diff --ignore-space-at-eol

Or if a Windows user clones a repository created on another system.  For
these cross-platform circumstances, it seems to me sensible to have an
option (probably enabled by default on all platforms) that allows files to
be munged on check in to whatever EOL style the repository creator preferred
(probably stored in .gitattributes and could be different for different
files in the repo - e.g. a windows vendor src dir on a cross-platform
project).  Note that this means that munging would only happen if someone
actually asked for it - which would be a sensible thing to do as the
administrator of a cross-platform project.

Then there would be a separate option (probably not enabled by default) to
check out with the platform's native line ending instead of whatever is in
the repo. This would allow people to work with inflexible toolsets.

Finally for people who want to work with native line endings that are
different from repository line endings, then it might be necessary to
improve the handling of diffs by providing a config var to make
--ignore-space-at-eol the default (or perhaps more correctly
--ignore-line-endings) for text files.  From my preliminary reading of list
history improving the inspection of content rather than trying to change
content might be the more gitish thing to do.

In conclusion all of these CRLF options are designed to help Windows users
play nicely with others.  But it seems to me naïve Windows users can be
perfectly happy with plain git so long as they stay in their own Windows
world.

jm2c, corrections welcome and apologies to those suffering from eol
exhaustion,

Greg.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
CRLF problems with Git on Win32, Peter Karlsson, (Mon Jan 7, 5:16 am)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Mon Jan 7, 5:57 am)
Re: CRLF problems with Git on Win32, Peter Klavins, (Mon Jan 7, 6:13 am)
Re: CRLF problems with Git on Win32, Peter Karlsson, (Mon Jan 7, 9:50 am)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Mon Jan 7, 12:05 pm)
Re: CRLF problems with Git on Win32, Peter Klavins, (Mon Jan 7, 10:14 am)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Mon Jan 7, 8:58 am)
Re: CRLF problems with Git on Win32, Jeff King, (Mon Jan 7, 6:12 am)
Re: CRLF problems with Git on Win32, Robin Rosenberg, (Mon Jan 7, 2:47 pm)
Re: CRLF problems with Git on Win32, Johannes Schindelin, (Mon Jan 7, 3:16 pm)
Re: CRLF problems with Git on Win32, Robin Rosenberg, (Mon Jan 7, 5:03 pm)
Re: CRLF problems with Git on Win32, Thomas Neumann, (Mon Jan 7, 5:42 pm)
Re: CRLF problems with Git on Win32, Peter Karlsson, (Tue Jan 8, 6:56 am)
Re: CRLF problems with Git on Win32, Jan Hudec, (Wed Jan 9, 2:46 pm)
Re: CRLF problems with Git on Win32, Peter Harris, (Tue Jan 8, 9:07 am)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Tue Jan 8, 5:33 pm)
Re: CRLF problems with Git on Win32, Kelvie Wong, (Tue Jan 8, 11:58 am)
Re: CRLF problems with Git on Win32, Peter Karlsson, (Tue Jan 8, 11:20 am)
Re: CRLF problems with Git on Win32, Johannes Schindelin, (Tue Jan 8, 7:52 am)
Re: CRLF problems with Git on Win32, Jeff King, (Tue Jan 8, 7:07 am)
Re: CRLF problems with Git on Win32, Johannes Schindelin, (Tue Jan 8, 7:54 am)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Mon Jan 7, 5:36 pm)
Re: CRLF problems with Git on Win32, Peter Karlsson, (Tue Jan 8, 5:26 pm)
Re: CRLF problems with Git on Win32, Johannes Schindelin, (Wed Jan 9, 6:56 am)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Wed Jan 9, 8:41 am)
Re: CRLF problems with Git on Win32, Gregory Jefferis, (Wed Jan 9, 9:52 am)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Wed Jan 9, 11:03 am)
Re: CRLF problems with Git on Win32, Gregory Jefferis, (Wed Jan 9, 1:37 pm)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Wed Jan 9, 3:05 pm)
Re: CRLF problems with Git on Win32, Johannes Schindelin, (Wed Jan 9, 10:03 am)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Wed Jan 9, 11:22 am)
Re: CRLF problems with Git on Win32, Johannes Schindelin, (Mon Jan 7, 5:18 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Mon Jan 7, 5:40 pm)
Re: CRLF problems with Git on Win32, J. Bruce Fields, (Tue Jan 8, 1:29 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Tue Jan 8, 1:56 pm)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Tue Jan 8, 2:07 pm)
Re: CRLF problems with Git on Win32, Gregory Jefferis, (Thu Jan 10, 3:58 pm)
Re: CRLF problems with Git on Win32, Rogan Dawes, (Thu Jan 10, 4:50 pm)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Thu Jan 10, 9:15 pm)
Re: CRLF problems with Git on Win32, Gregory Jefferis, (Thu Jan 10, 5:15 pm)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Thu Jan 10, 4:20 pm)
Re: CRLF problems with Git on Win32, Gregory Jefferis, (Thu Jan 10, 5:28 pm)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Thu Jan 10, 8:02 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Fri Jan 11, 3:10 am)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Fri Jan 11, 11:58 am)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Fri Jan 11, 12:28 pm)
Re: CRLF problems with Git on Win32, Gregory Jefferis, (Fri Jan 11, 3:00 pm)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Sat Jan 12, 11:26 am)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Fri Jan 11, 1:25 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Fri Jan 11, 1:56 pm)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Fri Jan 11, 2:10 pm)
Re: CRLF problems with Git on Win32, Christer Weinigel, (Fri Jan 11, 3:53 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Fri Jan 11, 2:29 pm)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Fri Jan 11, 3:16 pm)
Re: CRLF problems with Git on Win32, Sam Ravnborg, (Fri Jan 11, 3:50 pm)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Sat Jan 12, 11:08 am)
Re: CRLF problems with Git on Win32, Johannes Schindelin, (Fri Jan 11, 5:18 pm)
Re: CRLF problems with Git on Win32, Sam Ravnborg, (Fri Jan 11, 6:21 pm)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Thu Jan 10, 8:32 pm)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Thu Jan 10, 7:23 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Tue Jan 8, 2:58 pm)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Tue Jan 8, 4:50 pm)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Tue Jan 8, 5:31 pm)
Re: CRLF problems with Git on Win32, Dmitry Potapov, (Tue Jan 8, 6:51 pm)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Tue Jan 8, 8:01 pm)
Re: CRLF problems with Git on Win32, Sean, (Tue Jan 8, 6:09 pm)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Tue Jan 8, 5:15 pm)
Re: CRLF problems with Git on Win32, Robin Rosenberg, (Tue Jan 8, 5:57 pm)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Tue Jan 8, 4:11 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Tue Jan 8, 4:20 pm)
Re: CRLF problems with Git on Win32, J. Bruce Fields, (Tue Jan 8, 3:09 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Tue Jan 8, 3:59 pm)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Tue Jan 8, 3:47 pm)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Tue Jan 8, 4:41 pm)
Re: [msysGit] Re: CRLF problems with Git on Win32, Steffen Prohaska, (Tue Jan 8, 4:02 pm)
Re: [msysGit] Re: CRLF problems with Git on Win32, Johannes Schindelin, (Wed Jan 9, 7:03 am)
Re: [msysGit] Re: CRLF problems with Git on Win32, Steffen Prohaska, (Wed Jan 9, 8:45 am)
Re: [msysGit] Re: CRLF problems with Git on Win32, Johannes Schindelin, (Wed Jan 9, 9:32 am)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Tue Jan 8, 4:15 pm)
Re: [msysGit] Re: CRLF problems with Git on Win32, Steffen Prohaska, (Tue Jan 8, 4:39 pm)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Mon Jan 7, 6:06 pm)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Tue Jan 8, 3:02 am)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Tue Jan 8, 3:29 am)
Re: CRLF problems with Git on Win32, Jeff King, (Tue Jan 8, 6:08 am)
Re: CRLF problems with Git on Win32, Gregory Jefferis, (Tue Jan 8, 8:20 am)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Tue Jan 8, 6:35 am)
Re: CRLF problems with Git on Win32, Linus Torvalds, (Mon Jan 7, 6:58 pm)
Re: [msysGit] Re: CRLF problems with Git on Win32, Marius Storm-Olsen, (Tue Jan 8, 4:55 am)
Re: CRLF problems with Git on Win32, Gregory Jefferis, (Mon Jan 7, 7:46 pm)
git and unicode, Gonzalo Garramuño, (Tue Jan 8, 7:09 am)
Re: git and unicode, Robin Rosenberg, (Tue Jan 8, 4:36 pm)
Re: git and unicode, Remi Vanicat, (Tue Jan 8, 11:09 am)
Re: CRLF problems with Git on Win32, Junio C Hamano, (Mon Jan 7, 6:00 am)
Re: CRLF problems with Git on Win32, Steffen Prohaska, (Mon Jan 7, 8:15 am)
speck-geostationary