]> git.ipfire.org Git - thirdparty/git.git/commit - convert.c
Fix 'crlf' attribute semantics.
authorJunio C Hamano <junkio@cox.net>
Sun, 15 Apr 2007 20:35:45 +0000 (13:35 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 15 Apr 2007 20:35:45 +0000 (13:35 -0700)
commit201ac8efc79668353281583629aa15ac7f36e843
tree47e2fb942f76d24d329ad6b61f8ff23a9df44c02
parent8c701249d2257699c19822b528c101668abc55b9
Fix 'crlf' attribute semantics.

Earlier we said 'crlf lets the path go through core.autocrlf
process while !crlf disables it altogether'.  This fixes the
semantics to:

 - Lack of 'crlf' attribute makes core.autocrlf to apply
   (i.e. we guess based on the contents and if platform
   expresses its desire to have CRLF line endings via
   core.autocrlf, we do so).

 - Setting 'crlf' attribute to true forces CRLF line endings in
   working tree files, even if blob does not look like text
   (e.g. contains NUL or other bytes we consider binary).

 - Setting 'crlf' attribute to false disables conversion.

Signed-off-by: Junio C Hamano <junkio@cox.net>
convert.c