]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'tb/apply-with-crlf'
authorJunio C Hamano <gitster@pobox.com>
Sun, 27 Aug 2017 05:55:05 +0000 (22:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Aug 2017 05:55:05 +0000 (22:55 -0700)
"git apply" that is used as a better "patch -p1" failed to apply a
taken from a file with CRLF line endings to a file with CRLF line
endings.  The root cause was because it misused convert_to_git()
that tried to do "safe-crlf" processing by looking at the index
entry at the same path, which is a nonsense---in that mode, "apply"
is not working on the data in (or derived from) the index at all.
This has been fixed.

* tb/apply-with-crlf:
  apply: file commited with CRLF should roundtrip diff and apply
  convert: add SAFE_CRLF_KEEP_CRLF

1  2 
apply.c
convert.c
convert.h

diff --cc apply.c
Simple merge
diff --cc convert.c
Simple merge
diff --cc convert.h
Simple merge