From: Theodore Tso <tytso@mit.edu>
To: Mark Levedahl <mlevedahl@verizon.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: mingw, windows, crlf/lf, and git
Date: Sun, 11 Feb 2007 23:24:25 -0500 [thread overview]
Message-ID: <20070212042425.GB18010@thunk.org> (raw)
In-Reply-To: <45CFA30C.6030202@verizon.net>
On Sun, Feb 11, 2007 at 06:13:16PM -0500, Mark Levedahl wrote:
> I am NOT intending to start a flamewar O:-) , so please don't turn this
> into one.
>
> The recent threads on a mingw git port are explicit in the intent to
> provide a Windows native git. I believe there is a fundamental conflict
> here with the position, clearly stated by Linus, that git does not alter
> content in any way. Windows suffers the curse of DOS line endings (\r\n
> vs \n), and a true port to Windows *must* allow for \r\n and \n to be
> semantically the same thing as most large projects end up with a mixture
> of such files and/or are targeting cross-platform capabilities. The
> major competing solutions git seeks to supplant (cvs, cvsnt, svn, hg)
> have capability to recognize "text" files and transparently replace \r\n
> with \n on input, the reverse on output, and ignore all such differences
> on diff operations. To be relevant on native Windows, git must do the
> same. Otherwise, git will be deemed "too wierd" and dismissed in favor
> of a tool "that works."
So this is something that I've tried proposing to the Mercurial
developers, but it's never been implemented in hg. It'll be
interesting to see what the git community thinks. :-)
My proposal does require adding a file type to each file, as tracked
metadata, which may doom it from the start. If you add a file type,
then you have to support mutating the file type, and some way of
handling merge conflicts (generally, picking one type or another).
Then for each file type, we implement a set of interfaces (perhaps as
simple as a series of executables named git-<type>-<operation>) which
if present, transforms the file from its live format to the canonical
format which is actually checked in and back again. Besides using
this for the DOS CR/LF problem, it also allows for an efficient
storage of things like OpenOffice files which are a zipped set of .xml
files. By decompressing them before pushing them into the SCM, it
means that if the user makes a tiny spelling correction in their
OpenOffice file, the delta stored in the git repository can be much
more efficiently stored (since the diff of the .xml tree will be
small, where as the diff of the entire compressed file is likely going
to be close to the entire size of the .odt file).
Another nice thing to provide for each file type would be a
pretty-printer for the diffs, so it becomes easier to see the delta
between two versions of an OpenOffice file in a textual window.
So, is this idea sane or completely insane? Hopefully it passes
Linus's it-solves-multiple-problems-at-once test, at least. :-)
- Ted
next prev parent reply other threads:[~2007-02-12 6:39 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-11 23:13 mingw, windows, crlf/lf, and git Mark Levedahl
2007-02-11 23:34 ` Johannes Schindelin
2007-02-12 0:46 ` Jakub Narebski
2007-02-12 2:36 ` Mark Levedahl
2007-02-12 11:21 ` Johannes Schindelin
2007-02-12 0:14 ` Robin Rosenberg
2007-02-12 2:37 ` Mark Levedahl
2007-02-12 4:24 ` Theodore Tso [this message]
2007-02-12 7:28 ` David Lang
2007-02-12 11:36 ` Johannes Schindelin
2007-02-12 17:20 ` Linus Torvalds
2007-02-12 22:37 ` Johannes Schindelin
2007-02-12 23:02 ` Linus Torvalds
2007-02-12 22:54 ` Junio C Hamano
2007-02-12 23:02 ` Junio C Hamano
2007-02-12 23:09 ` Linus Torvalds
2007-02-12 23:25 ` Linus Torvalds
2007-02-12 23:23 ` David Lang
2007-02-12 23:24 ` Johannes Schindelin
2007-02-12 23:42 ` Junio C Hamano
2007-02-12 23:46 ` David Lang
2007-02-12 23:50 ` Johannes Schindelin
2007-02-13 0:59 ` Mark Levedahl
2007-02-13 1:06 ` Johannes Schindelin
2007-02-13 1:13 ` Shawn O. Pearce
2007-02-13 1:20 ` David Lang
2007-02-13 1:36 ` Mark Levedahl
2007-02-13 5:18 ` Jeff King
2007-02-13 0:32 ` Mark Levedahl
2007-02-13 2:02 ` Junio C Hamano
2007-02-13 3:21 ` Mark Levedahl
2007-02-13 6:05 ` Junio C Hamano
2007-02-13 3:32 ` Alexander Litvinov
2007-02-13 10:06 ` Johannes Schindelin
2007-02-13 12:16 ` Alexander Litvinov
2007-02-13 12:37 ` Johannes Schindelin
2007-02-13 19:36 ` Mark Levedahl
2007-02-13 20:32 ` Linus Torvalds
2007-02-14 1:42 ` Mark Levedahl
2007-02-14 2:16 ` Linus Torvalds
2007-02-13 21:58 ` Robin Rosenberg
2007-02-14 1:18 ` Mark Levedahl
2007-02-13 16:52 ` Linus Torvalds
2007-02-13 17:23 ` Linus Torvalds
2007-02-13 17:23 ` Linus Torvalds
2007-02-13 18:00 ` Junio C Hamano
2007-02-13 19:07 ` Linus Torvalds
2007-02-13 20:42 ` Sam Ravnborg
2007-02-13 21:08 ` Nicolas Pitre
2007-02-13 23:19 ` David Lang
2007-02-13 23:28 ` Linus Torvalds
2007-02-14 8:41 ` Sam Ravnborg
2007-02-14 16:28 ` Linus Torvalds
2007-02-14 16:47 ` Sam Ravnborg
2007-02-14 3:47 ` Alexander Litvinov
2007-02-14 5:16 ` Junio C Hamano
2007-02-14 5:36 ` Linus Torvalds
2007-02-14 11:10 ` Johannes Schindelin
2007-02-14 14:26 ` Mark Levedahl
2007-02-14 15:51 ` Linus Torvalds
2007-02-14 16:39 ` Junio C Hamano
2007-02-14 17:01 ` Linus Torvalds
2007-02-14 17:29 ` Junio C Hamano
2007-02-14 17:43 ` Linus Torvalds
2007-02-14 15:56 ` Johannes Schindelin
2007-02-14 16:23 ` Linus Torvalds
2007-02-14 17:28 ` Mark Levedahl
2007-02-14 18:17 ` Robin Rosenberg
2007-02-14 18:31 ` Linus Torvalds
2007-02-14 20:24 ` Robin Rosenberg
2007-02-14 15:44 ` Linus Torvalds
2007-02-14 15:53 ` Johannes Schindelin
2007-02-14 11:36 ` Alexander Litvinov
2007-02-14 16:37 ` Linus Torvalds
2007-02-14 17:18 ` Junio C Hamano
2007-02-14 16:16 ` Johannes Sixt
2007-02-14 16:53 ` Linus Torvalds
2007-02-13 18:05 ` Johannes Schindelin
2007-02-13 17:25 ` Nicolas Pitre
2007-02-13 18:04 ` Johannes Schindelin
2007-02-13 18:11 ` Junio C Hamano
2007-02-13 18:39 ` Linus Torvalds
2007-02-13 18:42 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070212042425.GB18010@thunk.org \
--to=tytso@mit.edu \
--cc=git@vger.kernel.org \
--cc=mlevedahl@verizon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).