Linus Torvalds 6c510bee20 Lazy man's auto-CRLF
It currently does NOT know about file attributes, so it does its
conversion purely based on content. Maybe that is more in the "git
philosophy" anyway, since content is king, but I think we should try to do
the file attributes to turn it off on demand.

Anyway, BY DEFAULT it is off regardless, because it requires a

	[core]
		AutoCRLF = true

in your config file to be enabled. We could make that the default for
Windows, of course, the same way we do some other things (filemode etc).

But you can actually enable it on UNIX, and it will cause:

 - "git update-index" will write blobs without CRLF
 - "git diff" will diff working tree files without CRLF
 - "git checkout" will write files to the working tree _with_ CRLF

and things work fine.

Funnily, it actually shows an odd file in git itself:

	git clone -n git test-crlf
	cd test-crlf
	git config core.autocrlf true
	git checkout
	git diff

shows a diff for "Documentation/docbook-xsl.css". Why? Because we have
actually checked in that file *with* CRLF! So when "core.autocrlf" is
true, we'll always generate a *different* hash for it in the index,
because the index hash will be for the content _without_ CRLF.

Is this complete? I dunno. It seems to work for me. It doesn't use the
filename at all right now, and that's probably a deficiency (we could
certainly make the "is_binary()" heuristics also take standard filename
heuristics into account).

I don't pass in the filename at all for the "index_fd()" case
(git-update-index), so that would need to be passed around, but this
actually works fine.

NOTE NOTE NOTE! The "is_binary()" heuristics are totally made-up by yours
truly. I will not guarantee that they work at all reasonable. Caveat
emptor. But it _is_ simple, and it _is_ safe, since it's all off by
default.

The patch is pretty simple - the biggest part is the new "convert.c" file,
but even that is really just basic stuff that anybody can write in
"Teaching C 101" as a final project for their first class in programming.
Not to say that it's bug-free, of course - but at least we're not talking
about rocket surgery here.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-14 11:19:22 -08:00
2007-02-06 01:09:32 -08:00
2007-02-03 21:49:54 -08:00
2007-02-03 21:49:54 -08:00
2007-02-06 21:33:20 -08:00
2007-01-22 16:25:15 -08:00
2007-02-06 01:52:04 -08:00
2007-02-03 21:49:54 -08:00
2007-02-08 15:35:24 -08:00
2007-01-21 21:29:57 -08:00
2007-02-08 15:35:24 -08:00
2007-02-08 15:35:24 -08:00
2006-05-01 22:29:16 -07:00
2007-02-14 11:19:22 -08:00
2007-02-14 11:19:22 -08:00
2006-11-21 20:55:39 -08:00
2007-02-14 11:19:22 -08:00
2005-12-27 10:49:25 -08:00
2005-08-09 22:28:19 -07:00
2005-10-14 17:17:27 -07:00
2007-02-03 21:49:54 -08:00
2007-01-20 18:57:47 -08:00
2006-05-15 12:32:13 -07:00
2007-02-14 11:19:22 -08:00
2006-12-29 11:01:31 -08:00
2007-02-14 11:19:22 -08:00
2007-02-14 11:19:22 -08:00
2006-03-05 02:47:29 -08:00
2006-02-06 21:43:27 -08:00
2007-02-03 21:49:54 -08:00
2007-02-03 21:49:54 -08:00
2007-02-08 15:23:52 -08:00
2005-09-07 17:45:20 -07:00
2007-01-18 14:22:24 -08:00
2007-01-30 21:03:11 -08:00
2007-02-14 00:00:00 +00:00
2006-09-27 23:59:09 -07:00
2007-02-11 12:42:01 -08:00
2006-06-26 14:58:41 -07:00
2007-02-14 11:19:22 -08:00
2006-09-14 11:48:11 -07:00
2006-08-31 16:24:39 -07:00
2007-01-11 16:47:34 -08:00
2007-01-17 12:03:50 -08:00
2007-02-08 17:48:22 -08:00
2007-02-03 11:57:18 -08:00
2007-01-30 02:30:25 -08:00
2007-02-14 11:19:22 -08:00
2006-03-05 02:47:29 -08:00
2006-10-20 16:50:36 -07:00
2005-11-02 16:50:58 -08:00
2006-03-25 16:35:43 -08:00
2006-10-26 18:31:17 -07:00

////////////////////////////////////////////////////////////////

	GIT - the stupid content tracker

////////////////////////////////////////////////////////////////

"git" can mean anything, depending on your mood.

 - random three-letter combination that is pronounceable, and not
   actually used by any common UNIX command.  The fact that it is a
   mispronunciation of "get" may or may not be relevant.
 - stupid. contemptible and despicable. simple. Take your pick from the
   dictionary of slang.
 - "global information tracker": you're in a good mood, and it actually
   works for you. Angels sing, and a light suddenly fills the room.
 - "goddamn idiotic truckload of sh*t": when it breaks

Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations
and full access to internals.

Git is an Open Source project covered by the GNU General Public License.
It was originally written by Linus Torvalds with help of a group of
hackers around the net. It is currently maintained by Junio C Hamano.

Please read the file INSTALL for installation instructions.
See Documentation/tutorial.txt to get started, then see
Documentation/everyday.txt for a useful minimum set of commands,
and "man git-commandname" for documentation of each command.
CVS users may also want to read Documentation/cvs-migration.txt.

Many Git online resources are accessible from http://git.or.cz/
including full documentation and Git related tools.

The user discussion and development of Git take place on the Git
mailing list -- everyone is welcome to post bug reports, feature
requests, comments and patches to git@vger.kernel.org. To subscribe
to the list, send an email with just "subscribe git" in the body to
majordomo@vger.kernel.org. The mailing list archives are available at
http://marc.theaimsgroup.com/?l=git and other archival sites.
Description
No description provided
Readme 582 MiB
Languages
C 50.5%
Shell 38.7%
Perl 4.5%
Tcl 3.2%
Python 0.8%
Other 2.1%