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

Re: Does GIT require property like Subversion?

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 8, 2006, 10:16 UTC
Message-ID
<egaj49$424$1@sea.gmane.org>
In-Reply-To
<20061008091900.GG30283@lug-owl.de>
Jan-Benedict Glaw wrote:
Show 12 quoted lines
> On Sun, 2006-10-08 17:10:51 +0800, Liu Yubao <yubao.liu@gmail.com> wrote:
>> I want to know whether there is a plan to add this feature, or GIT doesn't
>> require it at all.
>> 
>> Properties like encoding (path name, file content), eol-style, mime-type
>> are useful for editing.
> 
> GIT is a content tracker. It won't ever fiddle with your line
> endings. You put data in there and it'll be conserved bit-by-bit. So
> if you need to store file encodings, MIME types, automatic CR/CRLF/LF
> converstion etc, you have to put this metadata into some additional
> files, but GIT won't specifically handle that in any way.
Mimetype has no place (I think) in SCM. We could in pronciple "borrow"
Mercurial idea of input/output filters
  http://www.selenic.com/mercurial/wiki/index.cgi/EncodeDecodeFilter
which would (among others) enable to use constant eol-style in the shared
part of repository i.e. object database, while using OS native eol-style
(UNIX vs. Microsoft Windows vs. MacOS). eol-style doesn't matter much:
you can find good editors which are able to use any eol-style for any OS
nowadays.

File content encoding is something (if it is outside US-ASCII of course) that you would want either to have some default convention, or have it embedded in the file itself (like XML, HTML, or Emacs' file variables) to be able to read file _outside_ SCM.

Path name encoding is something that is global property of a repository, I think. We have i18n.commitEncoding configuration variable; we could add i18n.pathnameEncoding quite easily I think (and some way for Git to detect current filesystem pathname encoding, if possible). Although BTW I think that i18n.commitEncoding information should be made persistent, and copied when cloning repository.

But in fact the philosophy of Git _prohibits_ I think property bits. Unless we add ability (which can be done fairly easy even now, but will not be automatic) to save some metainfo (ACL, extended attributes, Subversion-like properties) along with the file (blob) and/or tree (directory).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Jan-Benedict GlawNext: Jakub Narebski
Message 3 of 8 in “Does GIT require property like Subversion?”
  1. Liu YubaoOct 8, 2006
  2. Jan-Benedict GlawOct 8, 2006
  3. Jakub NarebskiOct 8, 2006
  4. Jakub NarebskiOct 8, 2006
  5. Robin RosenbergOct 8, 2006
  6. Petr BaudisOct 8, 2006
  7. Jakub NarebskiOct 8, 2006
  8. Liu YubaoOct 9, 2006

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.